xo-interpreter2 stack: work on variable references [WIP]
This commit is contained in:
parent
2aa6dfd942
commit
4cd4328f07
6 changed files with 274 additions and 21 deletions
12
include/xo/reader2/ExpectExprSsm.hpp
Normal file
12
include/xo/reader2/ExpectExprSsm.hpp
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/** @file ExpectExprSsm.hpp
|
||||
*
|
||||
* @author Roland Conybeare, Feb 2026
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "DExpectExprSsm.hpp"
|
||||
#include "ssm/ISyntaxStateMachine_DExpectExprSsm.hpp"
|
||||
#include "ssm/IPrintable_DExpectExprSsm.hpp"
|
||||
|
||||
/* end ExpectExprSsm.hpp */
|
||||
|
|
@ -89,6 +89,9 @@ namespace xo {
|
|||
/** get unique (within stringtable) string, beginning with @p prefix **/
|
||||
const DUniqueString * gensym(std::string_view prefix);
|
||||
|
||||
/** get variable defn for @p symbolname, or else nullptr **/
|
||||
Binding lookup_binding(std::string_view symbolname);
|
||||
|
||||
/** push nested local symtab while parsing the body of a lambda expression;
|
||||
* restore previous symtab at the end of lambda-expression definition.
|
||||
* See @ref pop_local_symtab
|
||||
|
|
@ -229,6 +232,11 @@ namespace xo {
|
|||
obj<AExpression>,
|
||||
std::string_view expect_str);
|
||||
|
||||
/** report error - no binding for variable @p sym
|
||||
**/
|
||||
void error_unbound_variable(std::string_view ssm_name,
|
||||
std::string_view sym);
|
||||
|
||||
///@}
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue