From 9b15aa91bd6d75e492c3872f7d6efe1dba25030b Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Sun, 16 Nov 2014 19:36:20 -0800 Subject: opened up two more file-tests --- scalatexApi/src/main/scala/scalaparser/ScalaSyntax.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scalatexApi/src/main') diff --git a/scalatexApi/src/main/scala/scalaparser/ScalaSyntax.scala b/scalatexApi/src/main/scala/scalaparser/ScalaSyntax.scala index 0e183a1..029ed22 100644 --- a/scalatexApi/src/main/scala/scalaparser/ScalaSyntax.scala +++ b/scalatexApi/src/main/scala/scalaparser/ScalaSyntax.scala @@ -119,7 +119,7 @@ class ScalaSyntax(val input: ParserInput) extends Parser with Basic with Identif def Refinement = rule { optional(Newline) ~ '{' ~ oneOrMore(RefineStat).separatedBy(Semi) ~ '}' } def RefineStat = rule { "type" ~ TypeDef | Dcl | MATCH } def TypePat = rule { Type } - def Ascription = rule { ":" ~ (InfixType | oneOrMore(Annotation) | "_" ~ "*") } + def Ascription(G: B = t) = rule { ":" ~ (InfixType | oneOrMore(Annotation) | "_" ~ StrW("*", G)) } def ParamType = rule { "=>" ~ Type | Type ~ "*" | Type } @@ -134,7 +134,7 @@ class ScalaSyntax(val input: ParserInput) extends Parser with Basic with Identif "return" ~ optional(Expr(G)) | SimpleExpr() ~ ArgumentExprs() ~ '=' ~ Expr(G) | optional(SimpleExpr() ~ '.') ~ Id() ~ '=' ~ Expr(G) | - PostfixExpr(G) ~ optional("match" ~ '{' ~ CaseClauses ~ '}' | Ascription) + PostfixExpr(false) ~ optional("match" ~ '{' ~ CaseClauses ~ StrW("}", false) | Ascription(false)) ~ W(G) } def IfCFlow(G: B = t) = rule { "if" ~ '(' ~ Expr() ~ ')' ~ zeroOrMore(Newline) ~ Expr(G) ~ optional(optional(Semi) ~ "else" ~ Expr(G)) } -- cgit v1.2.3