Skip to content

How to differentiate between variables and functions #2657

Answered by josdejong
tannakartikey asked this question in Q&A
Discussion options

You must be logged in to vote

Good question. An expression with a function like sin(2) is parsed into a FunctionNode with a property .fn containing a SymbolNode with name sin. To check whether a SymbolNode is the name of a function, you can check whether it's parent is a FunctionNode or not.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by josdejong
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1783 on August 17, 2022 08:48.