MysoreScript
|
A string literal. More...
#include <ast.hh>
Public Member Functions | |
bool | construct (const pegmatite::InputRange &r, pegmatite::ASTStack &st, const ErrorReporter &er) override |
Construct the string from the source text. More... | |
bool | isConstantExpression () override |
Literals are constant expressions. More... | |
Obj | evaluateExpr (Interpreter::Context &c) override |
Evaluate the. More... | |
llvm::Value * | compileExpression (Compiler::Context &c) override |
Compile the string. More... | |
void | collectVarUses (std::unordered_set< std::string > &decls, std::unordered_set< std::string > &uses) override |
Literals do not define or use any values. More... | |
Public Member Functions inherited from AST::Expression | |
Obj | evaluate (Interpreter::Context &c) |
Evaluate the expression, caching the result if it's a constant expression. More... | |
void | interpret (Interpreter::Context &c) override final |
Interpret this expression as if it were a statement. More... | |
void | compile (Compiler::Context &c) override final |
Compile this expression as if it were a statement. More... | |
Additional Inherited Members | |
Protected Attributes inherited from AST::Expression | |
Interpreter::Value | cache |
Cached result for constant expression. More... | |
A string literal.
MysoreScript strings are instances of the String class.
|
inlineoverridevirtual |
Literals do not define or use any values.
Implements AST::Statement.
|
overridevirtual |
Compile the string.
Generates a string object and returns a constant pointer value that refers to it.
Implements AST::Expression.
Definition at line 583 of file compiler.cc.
|
inlineoverride |
|
overridevirtual |
Evaluate the.
Implements AST::Expression.
Definition at line 620 of file interpreter.cc.
|
inlineoverridevirtual |
Literals are constant expressions.
Reimplemented from AST::Expression.