fixed statement parsing problem of list slicing

This commit is contained in:
David Halter
2012-10-09 15:01:32 +02:00
parent 0e352e225f
commit fc861313ce
2 changed files with 4 additions and 2 deletions

View File

@@ -751,7 +751,6 @@ class Statement(Simple):
close_brackets = False
if type(result) == Call:
result = result.parent()
close_brackets = False
call = Call(tok, c_type, start_pos, parent=result)
result.add_to_current_field(call)
result = call
@@ -765,7 +764,7 @@ class Statement(Simple):
result = Array(start_pos, brackets[tok], parent=result)
result.parent().add_to_current_field(result)
elif tok == ':':
if is_call_or_close():
while is_call_or_close():
result = result.parent()
close_brackets = False
if result.type == Array.LIST: # [:] lookups

View File

@@ -30,6 +30,9 @@ b[8-7]
#? list()
b[8:]
#? list()
b[int():]
# -----------------
# iterable multiplication