add support for FunctionDeclaration, VariableDeclaration in functions