Replies: 2 comments 1 reply
-
You might be able to make it work by storing some state in the lambda but it's probably more straightforward to just make your own subclass of ASTVisitor and then you can store whatever state you need in plain old variables. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I already had something working using static strings inside the lambda function (as in the commented out code here, but I was hoping for something more elegant. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Giving a code like this:
How can I pass values between recursive visitor calls? I think I would like to pass arguments from upper parts of the tree sections, as well as returning a return values from lower level parts of the tree back to the upper sections
Let's say I want to recursively visit an
always
block and collect a list of all identifiers to check if all of them are in the sensitivity list.Do I have to traverse the AST Tree manually, or can I use
makeVisitor()
?Beta Was this translation helpful? Give feedback.
All reactions