This website works better with JavaScript.
Home
Explore
Help
Sign In
jmg
/
gitmirror
Watch
1
Star
0
Fork
0
Code
Issues
0
Pull Requests
0
Releases
39
Wiki
Activity
Browse Source
Better error for literal with bad escaping (Issue
#287
)
tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.7.4
Erez Shinan
5 years ago
parent
56978206a3
commit
f06a83a8a7
1 changed files
with
4 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+4
-1
lark/load_grammar.py
+ 4
- 1
lark/load_grammar.py
View File
@@ -351,7 +351,10 @@ def _fix_escaping(s):
for n in i:
w += n
if n == '\\':
n2 = next(i)
try:
n2 = next(i)
except StopIteration:
raise ValueError("Literal ended unexpectedly (bad escaping): `%r`" % s)
if n2 == '\\':
w += '\\\\'
elif n2 not in 'uxnftr':
Write
Preview
Loading…
Cancel
Save