3.7 handling of 4-level attribute import

Fixes #239
This commit is contained in:
rocky
2019-05-14 12:09:38 -04:00
parent 26140934da
commit 3abe8d11d3
4 changed files with 2 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -7,3 +7,4 @@ import http.client as httpclient
if len(__file__) == 0: if len(__file__) == 0:
# a.b.c should force consecutive LOAD_ATTRs # a.b.c should force consecutive LOAD_ATTRs
import a.b.c as d import a.b.c as d
import stuff0.stuff1.stuff2.stuff3 as stuff3

View File

@@ -73,8 +73,8 @@ class Python37Parser(Python36Parser):
POP_TOP POP_TOP POP_TOP POP_EXCEPT POP_TOP POP_BLOCK POP_TOP POP_TOP POP_TOP POP_EXCEPT POP_TOP POP_BLOCK
else_suite COME_FROM_LOOP else_suite COME_FROM_LOOP
# Is there a pattern here?
attributes ::= IMPORT_FROM ROT_TWO POP_TOP IMPORT_FROM attributes ::= IMPORT_FROM ROT_TWO POP_TOP IMPORT_FROM
attributes ::= attributes ROT_TWO POP_TOP IMPORT_FROM
attribute37 ::= expr LOAD_METHOD attribute37 ::= expr LOAD_METHOD
expr ::= attribute37 expr ::= attribute37