fix a parsing regression (calls with do inside param lists)

This treatment is applied only when "do" is used, because
the code foo(x: bar) is recognized as object construction.
This commit is contained in:
Zahary Karadjov
2017-04-10 12:08:36 +03:00
parent 9ffaee3f88
commit e7eb01ed48
2 changed files with 24 additions and 2 deletions

View File

@@ -211,6 +211,18 @@ StmtList
StmtList
DiscardStmt
Empty
Call
Ident !"foo"
Ident !"x"
Call
Ident !"bar"
StmtList
DiscardStmt
Empty
Else
StmtList
DiscardStmt
Empty
VarSection
IdentDefs
Ident !"a"
@@ -432,6 +444,13 @@ dumpTree:
else:
discard
# call with blocks as a param
foo(x, bar do:
discard
else:
discard
)
# introduce a variable
var a = foo
var a = foo()