Skip to content

Fix chained method#93

Merged
dalance merged 2 commits intodalance:masterfrom
skjdbg:fix_chained_method
Nov 29, 2023
Merged

Fix chained method#93
dalance merged 2 commits intodalance:masterfrom
skjdbg:fix_chained_method

Conversation

@skjdbg
Copy link
Copy Markdown
Contributor

@skjdbg skjdbg commented Nov 27, 2023

This PR fixes #91.
After investigating my examples, I noticed the method_call parser consumes the first method call (variable.method1()), leaving the other parsers to deal with a method call body on its own (.method2()) which obviously doesn't match anything.
Instead, variable.method1() should be recognized as a MethodCallRoot and matched with its MethodCallBody: method2()

Note that in the 3rd test I added, member was meant as a class member but is parsed as a method call. As far as I know, however, without more context (ie: the return type of method1() and its definition), we cannot rule out one possibility in favor of the other.

@dalance
Copy link
Copy Markdown
Owner

dalance commented Nov 29, 2023

Thank you for your contribution.
I'll merge this PR.

@dalance dalance merged commit 250354e into dalance:master Nov 29, 2023
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

Successfully merging this pull request may close these issues.

Parse error on chained method call

2 participants