diff options
author | Li Haoyi <haoyi@dropbox.com> | 2014-11-05 22:39:39 -0800 |
---|---|---|
committer | Li Haoyi <haoyi@dropbox.com> | 2014-11-05 22:39:39 -0800 |
commit | 652ebdfc8464c22647e0a84d1bcdcf9e9cb615b2 (patch) | |
tree | 3075dcb5ed00fa8d2e1f1b5e357cf32538cc8683 /scalatexApi/src/main/scala/scalatex/stages/Compiler.scala | |
parent | c6af197340ac1045afc1506a69a0bdf6f00fd595 (diff) | |
download | hands-on-scala-js-652ebdfc8464c22647e0a84d1bcdcf9e9cb615b2.tar.gz hands-on-scala-js-652ebdfc8464c22647e0a84d1bcdcf9e9cb615b2.tar.bz2 hands-on-scala-js-652ebdfc8464c22647e0a84d1bcdcf9e9cb615b2.zip |
Most error tests pass except for lambdas
Diffstat (limited to 'scalatexApi/src/main/scala/scalatex/stages/Compiler.scala')
-rw-r--r-- | scalatexApi/src/main/scala/scalatex/stages/Compiler.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scalatexApi/src/main/scala/scalatex/stages/Compiler.scala b/scalatexApi/src/main/scala/scalatex/stages/Compiler.scala index f55c348..af474d0 100644 --- a/scalatexApi/src/main/scala/scalatex/stages/Compiler.scala +++ b/scalatexApi/src/main/scala/scalatex/stages/Compiler.scala @@ -73,10 +73,11 @@ object Compiler{ println("Tree " + res) incPos(res, offset1) res - case Ast.Block.For(generators, Ast.Block(parts2, offset2), offset) => + case Ast.Block.For(generators, Ast.Block(parts2, offset2), offset1) => val fresh = c.fresh() - val tree = c.parse(s"$generators yield $fresh" ) + val tree = incPosRec(c.parse(s"$generators yield $fresh"), offset1 + 2) + def rec(t: Tree): Tree = t match { case a @ Apply(fun, List(f @ Function(vparams, body))) => val f2 = Function(vparams, rec(body)) |