A literal in the rule language. More...
#include <RuleBasedProgramTree.h>


Public Member Functions | |
| Literal (RuleVM::MemoryCell value) | |
| Constructs a literal from a MemoryCell. | |
| Type | getType () const override |
| void | generateCode (CodeGenerationContext &context, RuleVM::Program &program) const override |
| Generates code for evaluating this expression at runtime. | |
Public Member Functions inherited from autopas::RuleSyntax::Expression | |
| virtual | ~Expression ()=default |
| Virtual default constructor. | |
| virtual Type | getType () const =0 |
| virtual void | generateCode (CodeGenerationContext &context, RuleVM::Program &program) const =0 |
| Generates code for evaluating this expression at runtime. | |
Public Attributes | |
| RuleVM::MemoryCell | value |
| The value of the literal. | |
| Type | type |
| The type of the literal in AST. | |
A literal in the rule language.
|
explicit |
Constructs a literal from a MemoryCell.
| value | The memory cell to construct from. |
|
overridevirtual |
Generates code for evaluating this expression at runtime.
Value is put on top of the stack. May consume part of the stack.
| context | The context to generate the code in. |
| program | The program to append the code to. |
Implements autopas::RuleSyntax::Expression.
|
overridevirtual |
Implements autopas::RuleSyntax::Expression.