solidityj / solidity-antlr4

Solidity grammar for ANTLR4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Listening for `functionCall`?

fvictorio opened this issue · comments

Hi, I don't know much about ANTLR so sorry in advance if this doesn't make sense.

I want to add a Listener for functionCall, but those nodes are interpreted as expressions instead. I guess this happens because one of the rules for expression (the fourth one) has the same definition as functionCall (and that rule is not inside expression). Maybe replacing that for functionCall will do the trick?

Thanks!

Ok, that doesn't work because it causes a mutually left-recursive error.

Yes, there's a mutual left recursion error that I haven't found a workaround to. You can check the code at solidity-parser-antlr for how to handle the case.