polserver/testsuite/escript/prog
Eric Swanson 64503c2866
var statements in program blocks (#256)
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.
2020-08-30 01:32:38 -07:00
..
prog01.out Unit Tests: putting some orde rin escript unit tests 2015-12-19 02:31:08 +01:00
prog01.src Unit Tests: putting some orde rin escript unit tests 2015-12-19 02:31:08 +01:00
prog02.out Unit Tests: putting some orde rin escript unit tests 2015-12-19 02:31:08 +01:00
prog02.src Unit Tests: putting some orde rin escript unit tests 2015-12-19 02:31:08 +01:00
prog03.out Unit Tests: putting some orde rin escript unit tests 2015-12-19 02:31:08 +01:00
prog03.src Unit Tests: putting some orde rin escript unit tests 2015-12-19 02:31:08 +01:00
prog04.out Unit tests: full revision, now all run correctly 2015-12-19 05:31:23 +01:00
prog04.src Unit Tests: putting some orde rin escript unit tests 2015-12-19 02:31:08 +01:00
prog05.out Unit Tests: putting some orde rin escript unit tests 2015-12-19 02:31:08 +01:00
prog05.src Unit Tests: putting some orde rin escript unit tests 2015-12-19 02:31:08 +01:00
prog06-vars-are-local.out var statements in program blocks (#256) 2020-08-30 01:32:38 -07:00
prog06-vars-are-local.src var statements in program blocks (#256) 2020-08-30 01:32:38 -07:00