It's a bit unnatural to return untyped AST in a function for getting symbols.

I think `ParseTree` should be returned from a separate function. Untyped parsing should be really fast once type checking is done.