xo-expression2: upsert global vars works in DDefineSsm

This commit is contained in:
Roland Conybeare 2026-02-16 19:48:14 -05:00
commit 03847102be
3 changed files with 57 additions and 29 deletions

View file

@ -65,13 +65,12 @@ namespace xo {
/** @defgroup scm-globalsymtab-general-methods general methods **/
///@{
/** establish binding for @p sym, with type described by @p typeref,
* replacing existing global (if present) with the same name.
* Use memory from @p mm to create variable-expr
/** update this symtab to associate @p var with @c var->name().
* If there was a previous variable with the same name,
* replace it with @p var.
**/
DVariable * establish_variable(obj<AAllocator> mm,
const DUniqueString * sym,
TypeRef typeref);
void upsert_variable(obj<AAllocator> mm,
DVariable * var);
///@}
/** @defgroup scm-globalsymtab-symboltable-facet symboltable facet **/

View file

@ -48,6 +48,7 @@ namespace xo {
Binding path() const { return path_; }
void assign_name(const DUniqueString * name) { this->name_ = name; }
void assign_path(Binding b) { this->path_ = b; }
/** @defgroup scm-variable-expression-facet **/
///@{