Fixed global variables.

This commit is contained in:
Dave Halter
2014-09-26 11:58:11 +02:00
parent 4eaee09d6e
commit 90842ce62d

View File

@@ -595,7 +595,7 @@ class Parser(object):
self._scope.add_statement(kw)
if stmt is not None and tok_str == 'global':
for t in stmt._token_list:
if isinstance(t, pr.Name):
if isinstance(t, pr.NamePart):
# Add the global to the top module, it counts there.
self.module.add_global(t)
# decorator