diff options
author | Li Haoyi <haoyi@dropbox.com> | 2014-11-16 14:23:02 -0800 |
---|---|---|
committer | Li Haoyi <haoyi@dropbox.com> | 2014-11-16 14:23:02 -0800 |
commit | 04a1483c131da376a085c63fc02954f21d3d7a1b (patch) | |
tree | 6b70b766ba5878f9fa77dcac056b18e45947e758 /scalatexApi/src/main/scala/scalatex | |
parent | 70f9164e167398d75f99130a5325a3411215feb5 (diff) | |
download | hands-on-scala-js-04a1483c131da376a085c63fc02954f21d3d7a1b.tar.gz hands-on-scala-js-04a1483c131da376a085c63fc02954f21d3d7a1b.tar.bz2 hands-on-scala-js-04a1483c131da376a085c63fc02954f21d3d7a1b.zip |
WIP
Diffstat (limited to 'scalatexApi/src/main/scala/scalatex')
-rw-r--r-- | scalatexApi/src/main/scala/scalatex/stages/Parser.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scalatexApi/src/main/scala/scalatex/stages/Parser.scala b/scalatexApi/src/main/scala/scalatex/stages/Parser.scala index 1b67446..8647264 100644 --- a/scalatexApi/src/main/scala/scalatex/stages/Parser.scala +++ b/scalatexApi/src/main/scala/scalatex/stages/Parser.scala @@ -41,7 +41,7 @@ class Parser(input: ParserInput, indent: Int = 0, offset: Int = 0) extends Scala "@" ~ capture(Id | BlockExpr2 | ('(' ~ optional(Exprs) ~ ')')) } def Header = rule { - "@" ~ capture(Def | Import) + "@" ~ capture(Def(false) | Import) } def HeaderBlock: Rule1[Ast.Header] = rule{ @@ -65,7 +65,7 @@ class Parser(input: ParserInput, indent: Int = 0, offset: Int = 0) extends Scala test(cursorNextIndent() > indent) ~ runSubParser(new Parser(_, cursorNextIndent(), cursor).Body) } - def IfHead = rule{ "@" ~ capture("if" ~ "(" ~ Expr ~ ")") } + def IfHead = rule{ "@" ~ capture("if" ~ "(" ~ Expr() ~ ")") } def IfElse1 = rule{ push(offsetCursor) ~ IfHead ~ BraceBlock ~ optional("else" ~ (BraceBlock | IndentBlock)) } @@ -104,7 +104,7 @@ class Parser(input: ParserInput, indent: Int = 0, offset: Int = 0) extends Scala def TypeArgs2 = rule { '[' ~ Ws ~ Types ~ ']' } def ArgumentExprs2 = rule { '(' ~ Ws ~ - (optional(Exprs ~ ',' ~ Ws) ~ PostfixExpr ~ ':' ~ Ws ~ '_' ~ Ws ~ '*' ~ Ws | optional(Exprs) ) ~ + (optional(Exprs ~ ',' ~ Ws) ~ PostfixExpr() ~ ':' ~ Ws ~ '_' ~ Ws ~ '*' ~ Ws | optional(Exprs) ) ~ ')' } def BlockExpr2: Rule0 = rule { '{' ~ Ws ~ (CaseClauses | Block) ~ '}' } |