fix a problem with statements without parents
This commit is contained in:
1 parent
a7308fa51d
commit
8c56fba1e9
1 file changed
+1
@@ -394,6 +394,7 @@ class Parser(object):
|
|||||||
stmt = stmt_class(self.module, set_vars, used_vars, tok_list,
|
stmt = stmt_class(self.module, set_vars, used_vars, tok_list,
|
||||||
first_pos, self.end_pos)
|
first_pos, self.end_pos)
|
||||||
|
|
||||||
|
stmt.parent = self.top_module
|
||||||
self._check_user_stmt(stmt)
|
self._check_user_stmt(stmt)
|
||||||
|
|
||||||
# Attribute docstring (PEP 257) support
|
# Attribute docstring (PEP 257) support
|
||||||
|
|||||||
Reference in new issue
Block a user