aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/parsing/TreeBuilder.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-05-07 12:40:31 +0200
committerMartin Odersky <odersky@gmail.com>2013-05-07 12:40:31 +0200
commit214eb8b650a86d1708b1257f89f53840a121de62 (patch)
tree47ae9eaeee75244902ebb8ecf83143676c01273f /src/dotty/tools/dotc/parsing/TreeBuilder.scala
parentab39cb9f4d6451dd6e2a45e73f08db31a3cea5b3 (diff)
downloaddotty-214eb8b650a86d1708b1257f89f53840a121de62.tar.gz
dotty-214eb8b650a86d1708b1257f89f53840a121de62.tar.bz2
dotty-214eb8b650a86d1708b1257f89f53840a121de62.zip
Added a parser.
Synced parser and SyntaxSymmary. Parser now produces untyped trees that need to be desugared further. Also some tweaks to position to make it work well. This is a first version.
Diffstat (limited to 'src/dotty/tools/dotc/parsing/TreeBuilder.scala')
-rw-r--r--src/dotty/tools/dotc/parsing/TreeBuilder.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/parsing/TreeBuilder.scala b/src/dotty/tools/dotc/parsing/TreeBuilder.scala
index 0a008af9d..5caa4c695 100644
--- a/src/dotty/tools/dotc/parsing/TreeBuilder.scala
+++ b/src/dotty/tools/dotc/parsing/TreeBuilder.scala
@@ -10,6 +10,7 @@ import TreeInfo._
/** Methods for building trees, used in the parser. All the trees
* returned by this class must be untyped.
+ * Note: currently unused, should be refactored into UntypedTrees.
*/
class TreeBuilder(implicit ctx: Context) {
@@ -123,7 +124,7 @@ class TreeBuilder(implicit ctx: Context) {
}
def stripParens(t: Tree) = t match {
- case Parens(ts) => makeTuple(ts)(t.pos)
+ case Parens(t) => t
case _ => t
}
@@ -155,7 +156,7 @@ class TreeBuilder(implicit ctx: Context) {
case arg => arg
} else args
val arguments = right match {
- case Parens(args) => mkNamed(args)
+ case Parens(arg) => mkNamed(arg :: Nil)
case _ => right :: Nil
}
if (isExpr) {