Is there a way to return a list of all expressions in an AST? #1334
-
For example if I have an AST of:
I'd like to return a list of all the expressions contained in that AST, so something like:
Is there some function that does that? |
Beta Was this translation helpful? Give feedback.
Answered by
tobymao
Mar 23, 2023
Replies: 1 comment 1 reply
-
[node.class for node, *_ in expression.walk()] |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
tobymao
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
[node.class for node, *_ in expression.walk()]