-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Question - Get defined and undefined scope from expression #1414
Comments
Yes you can extract all symbols in an expression. If you parse an expression using |
Perfect! Haven't seen that function. I made a recursive function to solve that, but I think filter is better. How can I you choose symbols (not functions) only? For example if a apply a log, then it appears it were a SymbolNode and I don't need it, just need the variables. |
I think I have the answer, using the second parameter from filter called "path" it is possible to discriminate whether it is "fn" or not. Thanks! |
Yes indeed, or you can check whether the |
Hi,
I would like to make an expression, but also, get the variables in there. Parser has a method called getAll, to get every defined variable into an expression, but I would like to get every variable, defined and undefined inside an expression. For example, if the expression is (x + y)/z -> get ['x', 'y', 'z'] as variables or as scope {x: undefined, y: undefined, z: undefined} or null. Is there a method that I could use to get that result or similar?
Thanks,
Sebastián.
The text was updated successfully, but these errors were encountered: