|
MysoreScript
|
A variable declaration. More...
#include <ast.hh>


Public Member Functions | |
| void | interpret (Interpreter::Context &c) override |
| Sets the variable to the value in the initialisation. More... | |
| void | compile (Compiler::Context &c) override |
| Compiles the initialiser, if one exists. More... | |
| void | collectVarUses (std::unordered_set< std::string > &decls, std::unordered_set< std::string > &uses) override |
| Adds this variable to the set that are defined. More... | |
Public Attributes | |
| ASTChild< Identifier > | name |
| The name of the variable. More... | |
| ASTPtr< Expression, true > | init |
| The initialiser for this variable, if there is one. More... | |
|
inlineoverridevirtual |
Adds this variable to the set that are defined.
Implements AST::Statement.
|
overridevirtual |
Compiles the initialiser, if one exists.
Reimplemented from AST::Statement.
Definition at line 601 of file compiler.cc.

|
overridevirtual |
Sets the variable to the value in the initialisation.
Implements AST::Statement.
Definition at line 648 of file interpreter.cc.

| ASTPtr<Expression, true> AST::Decl::init |
| ASTChild<Identifier> AST::Decl::name |
1.8.12