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
Small fix to propagate positions: remove preceding/trailing whitespace
tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.12.0
Erez Sh
4 years ago
parent
2409065529
commit
775f6f2b3e
1 changed files
with
2 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-1
lark/parse_tree_builder.py
+ 2
- 1
lark/parse_tree_builder.py
View File
@@ -28,7 +28,8 @@ def _pp_get_meta(children):
if not c.meta.empty:
return c.meta
elif isinstance(c, Token):
return c
if not c.isspace(): # Don't regard whitespace-only tokens
return c
class PropagatePositions:
def __init__(self, node_builder):
Write
Preview
Loading…
Cancel
Save