restructuring analysis function signatures

this allows for better handling of scoped symbol tables
and function info (return type and whether a statement
is inside a loop)