todo: move the compiler towards a more robust FunctionTree structure
todo: move the compiler towards a more robust FunctionTree structure

FunctionTree should really be something else, like DeclarationTree or AstTree. Basically it needs to contain the 3 main things: functions, types and global vars.
It already handles the first, through ft->funcs. I think a simple rename will do the trick, with the addition of new lists for types and vars. This basically leaves a few
existing methods of resolution:

1. FunctionTree/NewNameTree resolution
2. Pure mangledstring-based resolution (no hierarchy -- bad)
3. Whatever voodoo that's going on in StructMemberAccess.cpp (Linearised AST Traversal)

Functions currently use (1). Everything else is a mess. I'm not sure how to deal with types, and they might stay on the current system until I figure out a way to
cleanly move it away. Everything else should be moved to the tree based AST traversal... except maybe the namespace/static traversal. Since the only feasible way to work
with static namespace dot-operator-ing is to flatten the entire expression, that should stay.

And that's my rant of a commit message.

flax-lang/flax,flax-lang/flax