summaryrefslogtreecommitdiff
path: root/scalatexApi/src/main/scala
diff options
context:
space:
mode:
Diffstat (limited to 'scalatexApi/src/main/scala')
-rw-r--r--scalatexApi/src/main/scala/scalatex/stages/Parser.scala4
-rw-r--r--scalatexApi/src/main/scala/torimatomeru/ScalaSyntax.scala4
2 files changed, 4 insertions, 4 deletions
diff --git a/scalatexApi/src/main/scala/scalatex/stages/Parser.scala b/scalatexApi/src/main/scala/scalatex/stages/Parser.scala
index 9693544..d143463 100644
--- a/scalatexApi/src/main/scala/scalatex/stages/Parser.scala
+++ b/scalatexApi/src/main/scala/scalatex/stages/Parser.scala
@@ -99,7 +99,7 @@ class Parser(input: ParserInput, indent: Int = 0, offset: Int = 0) extends Scala
(push(offsetCursor) ~ capture(ArgumentExprs2) ~> ((x, y) => Ast.Chain.Args(y, x))) |
BraceBlock
}
- def Ws = Whitespace
+ def Ws = WhiteLines
// clones of the version in ScalaSyntax, but without tailing whitespace or newlines
def TypeArgs2 = rule { '[' ~ Ws ~ Types ~ ']' }
def ArgumentExprs2 = rule {
@@ -107,7 +107,7 @@ class Parser(input: ParserInput, indent: Int = 0, offset: Int = 0) extends Scala
(optional(Exprs ~ ',' ~ Ws) ~ PostfixExpr() ~ ':' ~ Ws ~ '_' ~ Ws ~ '*' ~ Ws | optional(Exprs) ) ~
')'
}
- def BlockExpr2: Rule0 = rule { '{' ~ Ws ~ (CaseClauses | Block) ~ '}' }
+ def BlockExpr2: Rule0 = rule { '{' ~ Ws ~ (CaseClauses | Block) ~ Ws ~ '}' }
def BraceBlock: Rule1[Ast.Block] = rule{ '{' ~ BodyNoBrace ~ '}' }
def BodyItem(exclusions: String): Rule1[Seq[Ast.Block.Sub]] = rule{
diff --git a/scalatexApi/src/main/scala/torimatomeru/ScalaSyntax.scala b/scalatexApi/src/main/scala/torimatomeru/ScalaSyntax.scala
index be3b076..283926e 100644
--- a/scalatexApi/src/main/scala/torimatomeru/ScalaSyntax.scala
+++ b/scalatexApi/src/main/scala/torimatomeru/ScalaSyntax.scala
@@ -129,7 +129,7 @@ class ScalaSyntax(val input: ParserInput) extends Parser with Basic with Identif
def SimpleExpr1(G: B = true) = rule{
"new" ~ (ClassTemplate(G) | TemplateBody(G)) |
BlockExpr(G) |
- LiteralS() ~ drop[String] |
+ LiteralS(G) ~ drop[String] |
Path(G) |
'_' |
'(' ~ optional(Exprs) ~ wspStrG(")", G)
@@ -144,7 +144,7 @@ class ScalaSyntax(val input: ParserInput) extends Parser with Basic with Identif
def BlockExpr(G: B = true): Rule0 = rule { '{' ~ (CaseClauses | Block) ~ wspStrG("}", G) }
def Block: Rule0 = rule { zeroOrMore(BlockStat ~ SemiS) ~ optional(ResultExpr()) }
def BlockStat: Rule0 = rule {
- &(SemiS) ~ MATCH | //shortcircuit when Semi is found
+ SemiS |
Import(false) |
zeroOrMore(Annotation) ~ (optional("implicit" | "lazy") ~ Def(false) | zeroOrMore(LocalModifier) ~ TmplDef(false)) |
Expr1(false)