diff options
Diffstat (limited to 'grammars/lua.bp')
| -rw-r--r-- | grammars/lua.bp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/grammars/lua.bp b/grammars/lua.bp index 7ffdc73..e8c9ba8 100644 --- a/grammars/lua.bp +++ b/grammars/lua.bp @@ -6,14 +6,14 @@ # full parse tree, and having one makes the task considerably more complicated. # See the accompanying README.md for more info. -comment: "--" (`[ @eqs=*`= `[ ..(`]eqs`]) % \n / ..$) -string: `"..`" % (`\.) / `'..`' % (`\.) / `[ @eqs=*`= `[ .. (`]eqs`]) % \n -table: `{..`} % (table/string/comment/\n) +comment: "--" (`[ @eqs=*`= `[ ..%\n (`]eqs`]) / ..$) +string: `"..%(`\.) `" / `' ..%(`\.) `' / `[ @eqs=*`= `[ ..%\n (`]eqs`]) +table: `{ ..%(table/string/comment/\n) `} keyword: |( "and" / "break" / "do" / "else" / "elseif" / "end" / "false" / "for" / "function" / "goto" / "if" / "in" / "local" / "nil" / "not" / "or" / "repeat" / "return" / "then" / "true" / "until" / "while" )| function-def: |"function"|[_id (*(`.id)[`:id])]_ parens -block: function / |("do"/"then")| .. (|"end"|) % (comment/string/block/\n) -function: function-def .. (|"end"|) % (comment/string/block/\n) +block: function / |("do"/"then")| ..%(comment/string/block/\n) (|"end"|) +function: function-def ..%(comment/string/block/\n) (|"end"|) |
