Xreate
The Xreate programming language
Public Member Functions | Static Public Member Functions | List of all members
CodeScope Class Reference

AST node to represent a single code block/a scope of visibility. More...

#include <ast.h>

Detailed Description

AST node to represent a single code block/a scope of visibility.

Holds a single expression as a body along with set of variable assignments(declarations) used in body's expression.

See also
xreate::AST

Public Member Functions

void setBody (const Expression &body)
 Set expression as a body.
 
const ExpressiongetBody () const
 Returns current code scope body.
 
Symbol addDefinition (Expression &&var, Expression &&body)
 Adds variable definition to be used in body as well as in other declarations.
 
void addBinding (Expression &&var, Expression &&argument, const VNameId hintBindingId=0)
 Adds variable defined elsewhere.
 

Static Public Member Functions

static const ExpressiongetDefinition (const Symbol &symbol, bool flagAllowUndefined=false)
 Returns symbols' definition.
 

The documentation for this class was generated from the following files: