Skip to content

Commit 8543d0b

Browse files
committed
Comment out Macros
1 parent 5f55e98 commit 8543d0b

33 files changed

+2897
-2898
lines changed

project/GenFactories.scala

Lines changed: 148 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ $endif$
11241124
* ^
11251125
* </pre>
11261126
*/
1127-
def be(aType: ResultOfATypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = macro MatcherFactory$arity$.andNotATypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]
1127+
def be(aType: ResultOfATypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = ??? //macro MatcherFactory$arity$.andNotATypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]
11281128
11291129
/**
11301130
* This method enables the following syntax given a <code>MatcherFactory$arity$</code>:
@@ -1134,7 +1134,7 @@ $endif$
11341134
* ^
11351135
* </pre>
11361136
*/
1137-
def be(anType: ResultOfAnTypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = macro MatcherFactory$arity$.andNotAnTypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]
1137+
def be(anType: ResultOfAnTypeInvocation[_]): MatcherFactory$arity$[SC with AnyRef, $commaSeparatedTCNs$] = ??? //macro MatcherFactory$arity$.andNotAnTypeMatcherFactory$arity$[SC, $commaSeparatedTCNs$]
11381138
11391139
/**
11401140
* This method enables the following syntax given a <code>MatcherFactory$arity$</code>:
@@ -1516,7 +1516,7 @@ $endif$
15161516
* ^
15171517
* </pre>
15181518
*/
1519-
def matchPattern(right: PartialFunction[Any, _]) = macro MatchPatternMacro.andNotMatchPatternMatcher
1519+
def matchPattern(right: PartialFunction[Any, _]) = ??? //macro MatchPatternMacro.andNotMatchPatternMatcher
15201520
}
15211521
"""
15221522

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

29942993
// 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)