Commit Graph

58 Commits

Author SHA1 Message Date
Doug Gregor
d1ce3b82ef Add support for the C-style 'for' statement. 2016-09-02 17:13:05 -07:00
Doug Gregor
b3855c9057 Add switch/case support 2016-09-02 17:13:05 -07:00
Doug Gregor
1e52d53ae2 Add support for do-catch 2016-09-02 17:13:05 -07:00
Doug Gregor
8c31960900 Add support for for-each statements 2016-09-02 17:13:05 -07:00
Doug Gregor
ebad77e1af Add support for repeat-while. 2016-09-02 17:13:05 -07:00
Doug Gregor
c775d94478 [Scope map] Add support for conditional statements. 2016-09-02 17:13:05 -07:00
Doug Gregor
b6a93246ac [Scope map] Use continuations for local declarations that introduce scopes. 2016-09-02 17:13:05 -07:00
Doug Gregor
4e214687ca [WIP Name binding] Introduce a basic 'scope map' to model scopes in the AST.
The scope map models all of the name lookup scopes within a source
file. It can be queried by source location to find the innermost scope
that contains that source location. Then, one can follow the parent
pointers in the scope to enumerate the enclosing scopes.

The scope map itself is lazily constructed, only creating scope map
nodes when required implicitly (e.g, when searching for a particular
innermost scope) or forced for debugging purposes.

using a lazily-constructed tree that can be searched by source
location. A search within a particular source location will
2016-09-02 17:13:05 -07:00