summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
diff options
context:
space:
mode:
authorDen Shabalin <den.shabalin@gmail.com>2013-08-08 18:55:45 +0200
committerDen Shabalin <den.shabalin@gmail.com>2013-08-14 11:45:47 +0200
commite1bef09d8afe58d00aa0620ee1fd5e7ff92fe470 (patch)
treeeadd8288ddf464d02e65824cc4834fce968d4bd3 /src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
parentb4598b4a7826b76cc6405b448b50d6c20f7a5732 (diff)
downloadscala-e1bef09d8afe58d00aa0620ee1fd5e7ff92fe470.tar.gz
scala-e1bef09d8afe58d00aa0620ee1fd5e7ff92fe470.tar.bz2
scala-e1bef09d8afe58d00aa0620ee1fd5e7ff92fe470.zip
SI-6843 well-positioned syntax errors for quasiquotes
This is achieved in a following way: 1. Similarly to toolbox quasiquotes can go away with wrapping for parsing purpose after introduction of `parseStats` and `parseRule` entry points. 2. In case of syntax error quasiquote computes equivalent corresponding position in the source code with the help of `corrrespondingPosition` mapper which relies on position data collected into `posMap` during code generation.
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala')
-rw-r--r--src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
index 666f19851d..ed694023d7 100644
--- a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala
@@ -39,7 +39,7 @@ abstract class TreeBuilder {
* x becomes x @ _
* x: T becomes x @ (_: T)
*/
- private object patvarTransformer extends Transformer {
+ object patvarTransformer extends Transformer {
override def transform(tree: Tree): Tree = tree match {
case Ident(name) if (treeInfo.isVarPattern(tree) && name != nme.WILDCARD) =>
atPos(tree.pos)(Bind(name, atPos(tree.pos.focus) (Ident(nme.WILDCARD))))