Permalink
Browse files

[fix] compiler, syntax: first case is optional (usefull for simple pa…

…rser)
  • Loading branch information...
1 parent e1512f9 commit a62bfa3d36d692c26bc604f35f85328d8dffe7f3 @BourgerieQuentin BourgerieQuentin committed Feb 9, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 opalang/js_syntax/trx.trx
@@ -37,14 +37,13 @@ rbrace <- Opa_lexer.rbrace $
;Expression = deco(Expression_aux)
Expression_aux <-
- (Opa_parser.match_case ParserSeq:e {{e}})+:l
- {{ Trx_ast.Expr l }}
-
-;SubExpression = deco(SubExpression_aux)
-SubExpression_aux <-
Opa_parser.match_case? ParserSeq:e (Opa_parser.match_case ParserSeq:e {{e}})*:l
{{ Trx_ast.Expr (e::l) }}
+;SubExpression = deco(SubExpression_aux)
+SubExpression_aux <- Expression_aux
+
+
ExpressionAsFunction <- Opa_lexer.PARSER lbrace Expression:expr rbrace {{ expr }}
Item = deco(Item_aux)

0 comments on commit a62bfa3

Please sign in to comment.