Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong AST for Call with argument and do block #33

Open
uujava opened this issue Jun 1, 2016 · 0 comments
Open

wrong AST for Call with argument and do block #33

uujava opened this issue Jun 1, 2016 · 0 comments

Comments

@uujava
Copy link
Contributor

uujava commented Jun 1, 2016

Following code snipped parsed incorrectly:

A.call an_arg do
  do_block_call
end

This test case failed:

     assert_parse("[Script, [[Call, [Constant, [SimpleString, A]], [SimpleString, call], [[VCall, [SimpleString, an_arg]]], [Block, null, [[VCall, [SimpleString, do_block]]]]]], null]]]",
                  "A.call an_arg do; do_block; end")

Those are ok:

     assert_parse("[Script, [[FunctionalCall, [SimpleString, do_call], [[FunctionalCall, [SimpleString, curly_call], [], [Block, null, [[VCall, [SimpleString, curlyblock]]]]]], [Block, null, [[VCall, [SimpleString, doblock]]]]]]]",
                  "do_call curly_call {curlyblock} do;doblock;end")
     assert_parse("[Script, [[FunctionalCall, [SimpleString, a_call], [[FunctionalCall, [SimpleString, an_arg], [], [Block, null, [[VCall, [SimpleString, curlyblock]]]]]], null]]]",
                  "a_call an_arg { curlyblock }")
     assert_parse("[Script, [[FunctionalCall, [SimpleString, a_call], [[VCall, [SimpleString, an_arg]]], [Block, null, [[VCall, [SimpleString, do_block]]]]]]]",
                  "a_call an_arg do; do_block; end")
     assert_parse("[Script, [[Call, [Constant, [SimpleString, A]], [SimpleString, call], [[FunctionalCall, [SimpleString, an_arg], [], [Block, null, [[VCall, [SimpleString, curlyblock]]]]]], null]]]",
                  "A.call an_arg {curlyblock}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant