Skip to content

Commit

Permalink
[fix] compiler, syntax: first case is optional (usefull for simple pa…
Browse files Browse the repository at this point in the history
…rser)
  • Loading branch information
BourgerieQuentin committed Feb 9, 2012
1 parent e1512f9 commit a62bfa3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions opalang/js_syntax/trx.trx
Expand Up @@ -37,14 +37,13 @@ rbrace <- Opa_lexer.rbrace $


;Expression = deco(Expression_aux) ;Expression = deco(Expression_aux)
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 Opa_parser.match_case? ParserSeq:e (Opa_parser.match_case ParserSeq:e {{e}})*:l
{{ Trx_ast.Expr (e::l) }} {{ Trx_ast.Expr (e::l) }}


;SubExpression = deco(SubExpression_aux)
SubExpression_aux <- Expression_aux


ExpressionAsFunction <- Opa_lexer.PARSER lbrace Expression:expr rbrace {{ expr }} ExpressionAsFunction <- Opa_lexer.PARSER lbrace Expression:expr rbrace {{ expr }}


Item = deco(Item_aux) Item = deco(Item_aux)
Expand Down

0 comments on commit a62bfa3

Please sign in to comment.