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
How to get parent of the node using antlr4 typescript #4555
Comments
Have you tried parentCtx ?Envoyé de mon iPhoneLe 13 mars 2024 à 07:44, Suraiyab ***@***.***> a écrit :
I am generating a parser using below command
image.png (view on web)
I am unable to get the parent token for the current token using ParserRuleContext, I can't see getParent() function as mentioned in documentations
(https://github.com/antlr/antlr4/blob/dev/runtime/JavaScript/src/antlr4/context/ParserRuleContext.d.ts)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
I have tried but parentCtx is also ParserRuleContext |
Sorry I misread your question. |
This is a multi-step navigation in the parse tree. We don't know your grammar, but obviously there would need to be a rule that recognizes the entire input from |
I am generating a parser using below command
I am unable to get the parent token for the current token using ParserRuleContext, I can't see getParent() function as mentioned in documentations
(https://github.com/antlr/antlr4/blob/dev/runtime/JavaScript/src/antlr4/context/ParserRuleContext.d.ts)
The text was updated successfully, but these errors were encountered: