Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
DHParser
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
badw-it
DHParser
Commits
897ffc2a
Commit
897ffc2a
authored
Jun 13, 2020
by
eckhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parse.py: small optimization
parent
1215f1f6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
DHParser/parse.py
DHParser/parse.py
+6
-8
No files found.
DHParser/parse.py
View file @
897ffc2a
...
...
@@ -504,15 +504,13 @@ class Parser:
if
node
is
not
None
:
node
.
_pos
=
location
if
not
grammar
.
returning_from_recursion__
:
if
(
grammar
.
memoization__
and
not
grammar
.
returning_from_recursion__
# Variable-manipulating parsers will not be entered into the cache,
# because caching would interfere with changes of variable state.
# See `_rollback_location()` for the added compensation term.
and
location
>
grammar
.
last_rb__loc__
+
int
(
text
.
_len
==
rest
.
_len
)):
visited
[
location
]
=
(
node
,
rest
)
if
not
grammar
.
returning_from_recursion__
:
grammar
.
returning_from_recursion__
=
recursion_state
except
RecursionError
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment