* POLLOG* macros use the new formatting
removed all old logging functions
* removed old fmt lib from everything except StreamWriter
removed unneeded functions
* fixed review comments
Adds:
- model/LocalVariableScopeInfo.h
Stores, for local variable blocks:
- the names of the local variables in the block
- the "base index" of those local variables within the current scope
The code generator uses these to clean up local variables as they go out of scope.
We also need this when writing debug information.
Adds:
- analyzer/LocalVariableScope: tracks local variables created within a given scope.
- Instantiated on the stack during semantic analysis, this registers itself with LocalVariableScopes during construction and deregisters itself during destruction.
- Detects unused variables during deregistration
- analyzer/LocalVariableScopes: this is what LocalVariableScope registers with.
- keeps track of the stack of local scopes.
- can provide the current local scope, for var statements.
Other notes:
"Shadowed" variables: this is when a variable in one scope hides a variable in another, like so:
var a := 2;
if (a)
var a := 3;
a := 4;
endif
print(a); // still 2
"debug_variables": We'll use these later when writing debug files.