Skip to content

Commit

Permalink
lark.lark doesn't allow backslash-nl as a line-continuation, but load…
Browse files Browse the repository at this point in the history
…_grammar does.
  • Loading branch information
RossPatterson committed Feb 13, 2024
1 parent 9bf7ddf commit 7f02bd1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lark/grammars/lark.lark
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ TOKEN: /_?[A-Z][_A-Z0-9]*/
STRING: _STRING "i"?
REGEXP: /\/(?!\/)(\\\/|\\\\|[^\/])*?\/[imslux]*/
_NL: /(\r?\n)+\s*/
BACKSLASH: /\\[ ]*\n/

%import common.ESCAPED_STRING -> _STRING
%import common.SIGNED_INT -> NUMBER
Expand All @@ -75,3 +76,4 @@ COMMENT: /\s*/ "//" /[^\n]/* | /\s*/ "#" /[^\n]/*

%ignore WS_INLINE
%ignore COMMENT
%ignore BACKSLASH

0 comments on commit 7f02bd1

Please sign in to comment.