Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
badw-it
DHParser
Commits
1cf94671
Commit
1cf94671
authored
Mar 07, 2018
by
di68kap
Browse files
parse.Compiler: ValueError is raised if a compiler method returns None
parent
27fbcf5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
DHParser/parse.py
View file @
1cf94671
...
...
@@ -2031,6 +2031,8 @@ class Compiler:
self
.
context
.
append
(
node
)
result
=
compiler
(
node
)
self
.
context
.
pop
()
if
result
is
None
:
raise
ValueError
(
'%s failed to return a valid compilation result!'
%
str
(
compiler
))
# # the following statement makes sure that the error_flag
# # is propagated early on. Otherwise it is redundant, because
# # the __call__ method globally propagates the node's error_flag
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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