Closed HendrikHuebner closed 10 months ago
This would require constructing a symbol table, a kind of semantic analysis built on top of ASTs. pycparser doesn't provide this, as it concludes its job at constructing an AST. You can build semantic analysis on top of this, but it's out of scope for the core pycparser library.
(P.S. for reference, this was discussed before a couple of times (e.g. #342, #318))
Of course, a function call node contains the name of the function being called. But this function might be overloaded, so if there are multiple declarations by that name, you can't just search the tree for a declaration with the same name. Is there an easy way of getting the declaration for a function call or will I have to implement some kind of algorithm that finds the types of the arguments of the function call?