Merge pull request #2373 from renatahodovan/parser-import
[Python3] Fix the import of parser superclasses.
This commit is contained in:
commit
03a0a40835
|
@ -119,7 +119,10 @@ Parser(parser, funcs, atn, sempredFuncs, superClass) ::= <<
|
|||
|
||||
Parser_(parser, funcs, atn, sempredFuncs, ctor, superClass) ::= <<
|
||||
<if(superClass)>
|
||||
from .<superClass> import <superClass>
|
||||
if __name__ is not None and "." in __name__:
|
||||
from .<superClass> import <superClass>
|
||||
else:
|
||||
from <superClass> import <superClass>
|
||||
|
||||
<endif>
|
||||
<atn>
|
||||
|
|
Loading…
Reference in New Issue