summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/reflect
diff options
context:
space:
mode:
authorDenys Shabalin <denys.shabalin@typesafe.com>2014-03-10 12:09:48 +0200
committerDenys Shabalin <denys.shabalin@typesafe.com>2014-03-10 12:09:48 +0200
commit14e77b9c5071ea54bf3ace709037a1779d2c82f9 (patch)
tree6c416834dd20d3607b739bae0e14e7d7e1a5ea61 /src/compiler/scala/tools/reflect
parentc754ca89d6cb32445b56706bc3c37f38d7469539 (diff)
downloadscala-14e77b9c5071ea54bf3ace709037a1779d2c82f9.tar.gz
scala-14e77b9c5071ea54bf3ace709037a1779d2c82f9.tar.bz2
scala-14e77b9c5071ea54bf3ace709037a1779d2c82f9.zip
Move extra tuple placeholder case to reifyTreePlaceholder
Diffstat (limited to 'src/compiler/scala/tools/reflect')
-rw-r--r--src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala b/src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala
index b595e3ad2c..f8b5e7b6bd 100644
--- a/src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala
+++ b/src/compiler/scala/tools/reflect/quasiquotes/Reifiers.scala
@@ -131,6 +131,10 @@ trait Reifiers { self: Quasiquotes =>
case Placeholder(Hole(tree, NoDot)) if isReifyingPatterns => tree
case Placeholder(hole @ Hole(_, rank @ Dot())) => c.abort(hole.pos, s"Can't $action with $rank here")
case TuplePlaceholder(args) => reifyTuple(args)
+ // Due to greediness of syntactic applied we need to pre-emptively peek inside.
+ // `rest` will always be non-empty due to the rule on top of this one.
+ case SyntacticApplied(id @ Ident(nme.QUASIQUOTE_TUPLE), first :: rest) =>
+ mirrorBuildCall(nme.SyntacticApplied, reifyTreePlaceholder(Apply(id, first)), reify(rest))
case TupleTypePlaceholder(args) => reifyTupleType(args)
case FunctionTypePlaceholder(argtpes, restpe) => reifyFunctionType(argtpes, restpe)
case CasePlaceholder(hole) => hole.tree
@@ -181,10 +185,6 @@ trait Reifiers { self: Quasiquotes =>
reifyBuildCall(nme.SyntacticForYield, enums, body)
case SyntacticAssign(lhs, rhs) =>
reifyBuildCall(nme.SyntacticAssign, lhs, rhs)
- // rest will always be non-empty due to the fact that every single-parens
- // application will be reified by reifyTreePlaceholder before it gets here.
- case SyntacticApplied(id @ Ident(nme.QUASIQUOTE_TUPLE), first :: rest) =>
- mirrorBuildCall(nme.SyntacticApplied, reifyTreePlaceholder(Apply(id, first)), reify(rest))
case SyntacticApplied(fun, argss) if argss.nonEmpty =>
reifyBuildCall(nme.SyntacticApplied, fun, argss)
case SyntacticTypeApplied(fun, targs) if targs.nonEmpty =>