xo-interpreter2 stack: define-expr's work at top-level
This commit is contained in:
parent
57f6f9073e
commit
6f3833d6fb
56 changed files with 1550 additions and 65 deletions
|
|
@ -71,6 +71,7 @@ namespace xo {
|
|||
bool debug_flag() const noexcept { return debug_flag_; }
|
||||
ParserStack * stack() const noexcept { return stack_; }
|
||||
obj<AAllocator> expr_alloc() const noexcept { return expr_alloc_; }
|
||||
DGlobalSymtab * global_symtab() const noexcept { return global_symtab_.data(); }
|
||||
DLocalSymtab * local_symtab() const noexcept { return local_symtab_; }
|
||||
const ParserResult & result() const noexcept { return result_; }
|
||||
|
||||
|
|
@ -315,6 +316,17 @@ namespace xo {
|
|||
**/
|
||||
obj<AAllocator> aux_alloc_;
|
||||
|
||||
/** global symbol table.
|
||||
* Toplevel definitions go here.
|
||||
*
|
||||
* Uses mmap -> non-trivial destructor.
|
||||
*
|
||||
* TODO: may want to move ownership upstairs.
|
||||
* if so, along with stringtable_.
|
||||
* maybe new struct ParserState?
|
||||
**/
|
||||
dp<DGlobalSymtab> global_symtab_;
|
||||
|
||||
/** symbol table with local bindings.
|
||||
* non-null during parsing of lambda expressions.
|
||||
* Always allocated from @p expr_alloc_.
|
||||
|
|
@ -323,15 +335,6 @@ namespace xo {
|
|||
**/
|
||||
DLocalSymtab * local_symtab_ = nullptr;
|
||||
|
||||
/** global symbol table.
|
||||
* Toplevel definitions go here.
|
||||
*
|
||||
* Uses mmap -> non-trivial destructor.
|
||||
*
|
||||
* TODO: may want to move ownership upstairs
|
||||
**/
|
||||
dp<DGlobalSymtab> global_symtab_;
|
||||
|
||||
/** current output from parser **/
|
||||
ParserResult result_;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue