Put all function and variable declarations at the top of the scope in an AST