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

How do you get AST nodes from an action visitor? #77

Open
myblindy opened this issue Dec 31, 2021 · 0 comments
Open

How do you get AST nodes from an action visitor? #77

myblindy opened this issue Dec 31, 2021 · 0 comments

Comments

@myblindy
Copy link

As the question says, inside an action visitor I have method overloads of the type:

public override void OnVariableDefinition(Symbol head, SemanticBody body)

But neither head or body[i] where i is an integer seem to link to the AST nodes, only to the symbols (ie what kind of node it is). That's not useful for me, because I'm trying to parse something like:

var a = 10;

And all this tells me is that there is an expression, but not what the expression actually is. The expression is actually parsed correctly after the parser finishes and I inspect the AST, but I don't see how to get the AST nodes from my action while it's still parsing.

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