diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-09-26 19:00:54 +0300 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-09-26 19:00:54 +0300 |
commit | 4734494940f24661586728c00fa098076342abcf (patch) | |
tree | 2a4748fe0f72e785838543b1771539e247024b43 /src | |
parent | f483419ce298607b2d971292b79fff44b5969609 (diff) |
fix some parsing bugs
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/expr.lm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/compiler/expr.lm b/src/compiler/expr.lm index b763005..858adf4 100644 --- a/src/compiler/expr.lm +++ b/src/compiler/expr.lm @@ -23,7 +23,7 @@ context expr context paren literal `( `) - token EXPR / (any - [()]) / + token EXPR / any / def syntax [EXPR] | [`( syntax `)] @@ -37,8 +37,10 @@ context expr end context bracket - literal `[ `] `? `: - token EXPR / (any - '[' - ']' - ':') / + lex + literal `[ `] `? `: + token EXPR / any / + end def syntax [EXPR] | [`[ syntax `]] | [syntax `? syntax `: syntax] @@ -52,8 +54,10 @@ context expr end context arg - literal `( `) - token EXPR / (any - [(),]) / + lex + literal `( `) `, + token EXPR / any / + end def syntax [EXPR] | [`( syntax `)] |