Skip to content

Commit 127705f

Browse files
committed
Comment out Macros
1 parent 80a4abc commit 127705f

33 files changed

+2897
-2898
lines changed

project/GenFactories.scala

Lines changed: 148 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,7 @@ $endif$
11261126
* ^
11271127
* </pre>
11281128
*/
1129-
def be(aType: ResultOfATypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = macro MatcherFactory$arity$.andNotATypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]
1129+
def be(aType: ResultOfATypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = ??? //macro MatcherFactory$arity$.andNotATypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]
11301130
11311131
/**
11321132
* This method enables the following syntax given a <code>MatcherFactory$arity$</code>:
@@ -1136,7 +1136,7 @@ $endif$
11361136
* ^
11371137
* </pre>
11381138
*/
1139-
def be(anType: ResultOfAnTypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = macro MatcherFactory$arity$.andNotAnTypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]
1139+
def be(anType: ResultOfAnTypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = ??? //macro MatcherFactory$arity$.andNotAnTypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]
11401140
11411141
/**
11421142
* This method enables the following syntax given a <code>MatcherFactory$arity$</code>:
@@ -1518,7 +1518,7 @@ $endif$
15181518
* ^
15191519
* </pre>
15201520
*/
1521-
def matchPattern(right: PartialFunction[Any, _]) = macro MatchPatternMacro.andNotMatchPatternMatcher
1521+
def matchPattern(right: PartialFunction[Any, _]) = ??? //macro MatchPatternMacro.andNotMatchPatternMatcher
15221522
}
15231523
"""
15241524

@@ -2420,7 +2420,7 @@ $endif$
24202420
* ^
24212421
* </pre>
24222422
*/
2423-
def be(aType: ResultOfATypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = macro MatcherFactory$arity$.orNotATypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]
2423+
def be(aType: ResultOfATypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = ??? //macro MatcherFactory$arity$.orNotATypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]
24242424
24252425
/**
24262426
* This method enables the following syntax given a <code>MatcherFactory$arity$</code>:
@@ -2430,7 +2430,7 @@ $endif$
24302430
* ^
24312431
* </pre>
24322432
*/
2433-
def be(anType: ResultOfAnTypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = macro MatcherFactory$arity$.orNotAnTypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]
2433+
def be(anType: ResultOfAnTypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = ??? //macro MatcherFactory$arity$.orNotAnTypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]
24342434
24352435
/**
24362436
* This method enables the following syntax given a <code>MatcherFactory$arity$</code>:
@@ -2812,7 +2812,7 @@ $endif$
28122812
* ^
28132813
* </pre>
28142814
*/
2815-
def matchPattern(right: PartialFunction[Any, _]) = macro MatchPatternMacro.orNotMatchPatternMatcher
2815+
def matchPattern(right: PartialFunction[Any, _]) = ??? //macro MatchPatternMacro.orNotMatchPatternMatcher
28162816
}
28172817
28182818
/**
@@ -2848,149 +2848,148 @@ $endif$
28482848
thisMatcherFactory.or(MatcherWords.not.exist)
28492849
}
28502850
2851-
/**
2852-
* Companion object containing an implicit method that converts a <code>MatcherFactory$arity$</code> to a <code>Matcher</code>.
2853-
*
2854-
* @author Bill Venners
2855-
*/
2856-
object MatcherFactory$arity$ {
2857-
2858-
import scala.language.implicitConversions
2859-
2860-
/**
2861-
* Converts a <code>MatcherFactory$arity$</code> to a <code>Matcher</code>.
2862-
*
2863-
* @param matcherFactory a MatcherFactory$arity$ to convert
2864-
* @return a Matcher produced by the passed MatcherFactory$arity$
2865-
*/
2866-
implicit def produceMatcher[SC, $typeConstructors$, T <: SC : $colonSeparatedTCNs$](matcherFactory: MatcherFactory$arity$[SC, $commaSeparatedTCNs$]): Matcher[T] =
2867-
matcherFactory.matcher
2868-
2869-
import scala.reflect.macros.Context
2870-
2871-
/**
2872-
* This method is called by macro that supports 'and not a [Type]' syntax.
2873-
*/
2874-
def andNotATypeMatcherFactory$arity$[SC, $typeConstructors$](context: Context)(aType: context.Expr[ResultOfATypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] =
2875-
new MatcherFactory$arity$Macro[SC, $commaSeparatedTCNs$].andNotATypeMatcherFactory$arity$(context)(aType)
2876-
2877-
/**
2878-
* This method is called by macro that supports 'or not a [Type]' syntax.
2879-
*/
2880-
def orNotATypeMatcherFactory$arity$[SC, $typeConstructors$](context: Context)(aType: context.Expr[ResultOfATypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] =
2881-
new MatcherFactory$arity$Macro[SC, $commaSeparatedTCNs$].orNotATypeMatcherFactory$arity$(context)(aType)
2882-
2883-
/**
2884-
* This method is called by macro that supports 'and not a [Type]' syntax.
2885-
*/
2886-
def andNotAnTypeMatcherFactory$arity$[SC, $typeConstructors$](context: Context)(anType: context.Expr[ResultOfAnTypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] =
2887-
new MatcherFactory$arity$Macro[SC, $commaSeparatedTCNs$].andNotAnTypeMatcherFactory$arity$(context)(anType)
2888-
2889-
/**
2890-
* This method is called by macro that supports 'or not a [Type]' syntax.
2891-
*/
2892-
def orNotAnTypeMatcherFactory$arity$[SC, $typeConstructors$](context: Context)(anType: context.Expr[ResultOfAnTypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] =
2893-
new MatcherFactory$arity$Macro[SC, $commaSeparatedTCNs$].orNotAnTypeMatcherFactory$arity$(context)(anType)
2894-
}
2895-
2896-
private[scalatest] class MatcherFactory$arity$Macro[-SC, $typeConstructors$] {
2897-
2898-
import scala.reflect.macros.Context
2899-
2900-
def andNotATypeMatcherFactory$arity$(context: Context)(aType: context.Expr[ResultOfATypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] = {
2901-
import context.universe._
2902-
2903-
val rhs = TypeMatcherMacro.notATypeMatcher(context)(aType)
2904-
2905-
context.macroApplication match {
2906-
case Apply(Select(qualifier, _), _) =>
2907-
context.Expr(
2908-
Apply(
2909-
Select(
2910-
Select(
2911-
qualifier,
2912-
"owner"
2913-
),
2914-
newTermName("and")
2915-
),
2916-
List(rhs.tree)
2917-
)
2918-
)
2919-
case _ => context.abort(context.macroApplication.pos, "This macro should be used with 'and not' syntax only.")
2920-
}
2921-
}
2922-
2923-
def orNotATypeMatcherFactory$arity$(context: Context)(aType: context.Expr[ResultOfATypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] = {
2924-
import context.universe._
2925-
2926-
val rhs = TypeMatcherMacro.notATypeMatcher(context)(aType)
2927-
2928-
context.macroApplication match {
2929-
case Apply(Select(qualifier, _), _) =>
2930-
context.Expr(
2931-
Apply(
2932-
Select(
2933-
Select(
2934-
qualifier,
2935-
"owner"
2936-
),
2937-
newTermName("or")
2938-
),
2939-
List(rhs.tree)
2940-
)
2941-
)
2942-
case _ => context.abort(context.macroApplication.pos, "This macro should be used with 'or not' syntax only.")
2943-
}
2944-
}
2945-
2946-
def andNotAnTypeMatcherFactory$arity$(context: Context)(anType: context.Expr[ResultOfAnTypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] = {
2947-
import context.universe._
2948-
2949-
val rhs = TypeMatcherMacro.notAnTypeMatcher(context)(anType)
2950-
2951-
context.macroApplication match {
2952-
case Apply(Select(qualifier, _), _) =>
2953-
context.Expr(
2954-
Apply(
2955-
Select(
2956-
Select(
2957-
qualifier,
2958-
"owner"
2959-
),
2960-
newTermName("and")
2961-
),
2962-
List(rhs.tree)
2963-
)
2964-
)
2965-
case _ => context.abort(context.macroApplication.pos, "This macro should be used with 'and not' syntax only.")
2966-
}
2967-
}
2968-
2969-
def orNotAnTypeMatcherFactory$arity$(context: Context)(anType: context.Expr[ResultOfAnTypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] = {
2970-
import context.universe._
2971-
2972-
val rhs = TypeMatcherMacro.notAnTypeMatcher(context)(anType)
2973-
2974-
context.macroApplication match {
2975-
case Apply(Select(qualifier, _), _) =>
2976-
context.Expr(
2977-
Apply(
2978-
Select(
2979-
Select(
2980-
qualifier,
2981-
"owner"
2982-
),
2983-
newTermName("or")
2984-
),
2985-
List(rhs.tree)
2986-
)
2987-
)
2988-
case _ => context.abort(context.macroApplication.pos, "This macro should be used with 'or not' syntax only.")
2989-
}
2990-
}
2991-
2992-
}
2993-
2851+
// /**
2852+
// * Companion object containing an implicit method that converts a <code>MatcherFactory$arity$</code> to a <code>Matcher</code>.
2853+
// *
2854+
// * @author Bill Venners
2855+
// */
2856+
// object MatcherFactory$arity$ {
2857+
2858+
// import scala.language.implicitConversions
2859+
2860+
// /**
2861+
// * Converts a <code>MatcherFactory$arity$</code> to a <code>Matcher</code>.
2862+
// *
2863+
// * @param matcherFactory a MatcherFactory$arity$ to convert
2864+
// * @return a Matcher produced by the passed MatcherFactory$arity$
2865+
// */
2866+
// implicit def produceMatcher[SC, $typeConstructors$, T <: SC : $colonSeparatedTCNs$](matcherFactory: MatcherFactory$arity$[SC, $commaSeparatedTCNs$]): Matcher[T] =
2867+
// matcherFactory.matcher
2868+
2869+
// import scala.reflect.macros.Context
2870+
2871+
// /**
2872+
// * This method is called by macro that supports 'and not a [Type]' syntax.
2873+
// */
2874+
// def andNotATypeMatcherFactory$arity$[SC, $typeConstructors$](context: Context)(aType: context.Expr[ResultOfATypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] =
2875+
// new MatcherFactory$arity$Macro[SC, $commaSeparatedTCNs$].andNotATypeMatcherFactory$arity$(context)(aType)
2876+
2877+
// /**
2878+
// * This method is called by macro that supports 'or not a [Type]' syntax.
2879+
// */
2880+
// def orNotATypeMatcherFactory$arity$[SC, $typeConstructors$](context: Context)(aType: context.Expr[ResultOfATypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] =
2881+
// new MatcherFactory$arity$Macro[SC, $commaSeparatedTCNs$].orNotATypeMatcherFactory$arity$(context)(aType)
2882+
2883+
// /**
2884+
// * This method is called by macro that supports 'and not a [Type]' syntax.
2885+
// */
2886+
// def andNotAnTypeMatcherFactory$arity$[SC, $typeConstructors$](context: Context)(anType: context.Expr[ResultOfAnTypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] =
2887+
// new MatcherFactory$arity$Macro[SC, $commaSeparatedTCNs$].andNotAnTypeMatcherFactory$arity$(context)(anType)
2888+
2889+
// /**
2890+
// * This method is called by macro that supports 'or not a [Type]' syntax.
2891+
// */
2892+
// def orNotAnTypeMatcherFactory$arity$[SC, $typeConstructors$](context: Context)(anType: context.Expr[ResultOfAnTypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] =
2893+
// new MatcherFactory$arity$Macro[SC, $commaSeparatedTCNs$].orNotAnTypeMatcherFactory$arity$(context)(anType)
2894+
// }
2895+
2896+
// private[scalatest] class MatcherFactory$arity$Macro[-SC, $typeConstructors$] {
2897+
2898+
// import scala.reflect.macros.Context
2899+
2900+
// def andNotATypeMatcherFactory$arity$(context: Context)(aType: context.Expr[ResultOfATypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] = {
2901+
// import context.universe._
2902+
2903+
// val rhs = TypeMatcherMacro.notATypeMatcher(context)(aType)
2904+
2905+
// context.macroApplication match {
2906+
// case Apply(Select(qualifier, _), _) =>
2907+
// context.Expr(
2908+
// Apply(
2909+
// Select(
2910+
// Select(
2911+
// qualifier,
2912+
// "owner"
2913+
// ),
2914+
// newTermName("and")
2915+
// ),
2916+
// List(rhs.tree)
2917+
// )
2918+
// )
2919+
// case _ => context.abort(context.macroApplication.pos, "This macro should be used with 'and not' syntax only.")
2920+
// }
2921+
// }
2922+
2923+
// def orNotATypeMatcherFactory$arity$(context: Context)(aType: context.Expr[ResultOfATypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] = {
2924+
// import context.universe._
2925+
2926+
// val rhs = TypeMatcherMacro.notATypeMatcher(context)(aType)
2927+
2928+
// context.macroApplication match {
2929+
// case Apply(Select(qualifier, _), _) =>
2930+
// context.Expr(
2931+
// Apply(
2932+
// Select(
2933+
// Select(
2934+
// qualifier,
2935+
// "owner"
2936+
// ),
2937+
// newTermName("or")
2938+
// ),
2939+
// List(rhs.tree)
2940+
// )
2941+
// )
2942+
// case _ => context.abort(context.macroApplication.pos, "This macro should be used with 'or not' syntax only.")
2943+
// }
2944+
// }
2945+
2946+
// def andNotAnTypeMatcherFactory$arity$(context: Context)(anType: context.Expr[ResultOfAnTypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] = {
2947+
// import context.universe._
2948+
2949+
// val rhs = TypeMatcherMacro.notAnTypeMatcher(context)(anType)
2950+
2951+
// context.macroApplication match {
2952+
// case Apply(Select(qualifier, _), _) =>
2953+
// context.Expr(
2954+
// Apply(
2955+
// Select(
2956+
// Select(
2957+
// qualifier,
2958+
// "owner"
2959+
// ),
2960+
// newTermName("and")
2961+
// ),
2962+
// List(rhs.tree)
2963+
// )
2964+
// )
2965+
// case _ => context.abort(context.macroApplication.pos, "This macro should be used with 'and not' syntax only.")
2966+
// }
2967+
// }
2968+
2969+
// def orNotAnTypeMatcherFactory$arity$(context: Context)(anType: context.Expr[ResultOfAnTypeInvocation[_]]): context.Expr[MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$]] = {
2970+
// import context.universe._
2971+
2972+
// val rhs = TypeMatcherMacro.notAnTypeMatcher(context)(anType)
2973+
2974+
// context.macroApplication match {
2975+
// case Apply(Select(qualifier, _), _) =>
2976+
// context.Expr(
2977+
// Apply(
2978+
// Select(
2979+
// Select(
2980+
// qualifier,
2981+
// "owner"
2982+
// ),
2983+
// newTermName("or")
2984+
// ),
2985+
// List(rhs.tree)
2986+
// )
2987+
// )
2988+
// case _ => context.abort(context.macroApplication.pos, "This macro should be used with 'or not' syntax only.")
2989+
// }
2990+
// }
2991+
2992+
// }
29942993
"""
29952994

29962995
// For some reason that I don't understand, I need to leave off the stars before the <pre> when

project/templates/CharAnyVal.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ object NumericChar {
658658
* a valid <code>Char</code> literal, the invocation of this method
659659
* will not compile.)
660660
*/
661-
implicit def apply(value: Char): NumericChar = macro NumericCharMacro.apply
661+
implicit def apply(value: Char): NumericChar = ??? //NumericCharMacro.apply
662662

663663
/** The smallest value representable as a $typeName$. */
664664
final val MinValue: $typeName$ = $typeName$.ensuringValid($typeMinValue$)

project/templates/DoubleAnyVal.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ object $typeName$ {
738738
* literal, the invocation of this method will not
739739
* compile.)
740740
*/
741-
implicit def apply(value: Double): $typeName$ = macro $typeName$Macro.apply
741+
implicit def apply(value: Double): $typeName$ = ??? //$typeName$Macro.apply
742742

743743
/**
744744
* Implicit widening conversion from <code>$typeName$</code> to

project/templates/FloatAnyVal.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ object $typeName$ {
742742
* literal, the invocation of this method will not
743743
* compile.)
744744
*/
745-
implicit def apply(value: Float): $typeName$ = macro $typeName$Macro.apply
745+
implicit def apply(value: Float): $typeName$ = ??? //$typeName$Macro.apply
746746

747747
/**
748748
* Implicit widening conversion from <code>$typeName$</code> to

project/templates/IntAnyVal.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ object $typeName$ {
997997
* <code>Int</code> literal, the invocation of this method will not
998998
* compile.)
999999
*/
1000-
implicit def apply(value: Int): $typeName$ = macro $typeName$Macro.apply
1000+
implicit def apply(value: Int): $typeName$ = ??? //$typeName$Macro.apply
10011001

10021002
/**
10031003
* Implicit widening conversion from <code>$typeName$</code> to <code>Int</code>.

project/templates/LongAnyVal.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ object $typeName$ {
10381038
* literal, the invocation of this method will not
10391039
* compile.)
10401040
*/
1041-
implicit def apply(value: Long): $typeName$ = macro $typeName$Macro.apply
1041+
implicit def apply(value: Long): $typeName$ = ??? //$typeName$Macro.apply
10421042

10431043
/**
10441044
* Implicit widening conversion from <code>$typeName$</code> to

0 commit comments

Comments
 (0)