aboutsummaryrefslogtreecommitdiff
path: root/parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'parser.py')
-rwxr-xr-xparser.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/parser.py b/parser.py
index b376dbf..1d59800 100755
--- a/parser.py
+++ b/parser.py
@@ -125,7 +125,11 @@ def p_args_none(t):
t[0] = nodes.Arguments(t.lineno(0))
def p_error(t):
- print('Parser errored out at: ' + t.value)
+ if t is None:
+ txt = 'NONE'
+ else:
+ txt = t.value
+ print('Parser errored out at: ' + txt)
def test_lexer():
s = """hello = (something) # this = (that)