get_function_nodes function

Extract function names (declarations and definitions) from a root