A number literal.
More...
#include <ast.hh>
A number literal.
Definition at line 123 of file ast.hh.
§ collectVarUses()
void AST::Number::collectVarUses |
( |
std::unordered_set< std::string > & |
decls, |
|
|
std::unordered_set< std::string > & |
uses |
|
) |
| |
|
inlineoverrideprotectedvirtual |
§ compileExpression()
§ construct()
bool AST::Number::construct |
( |
const pegmatite::InputRange & |
r, |
|
|
pegmatite::ASTStack & |
st, |
|
|
const ErrorReporter & |
|
|
) |
| |
|
inlineoverride |
Constructs the class from the source range.
Numbers are terminals, so this will construct the numeric value from the text.
Definition at line 134 of file ast.hh.
§ evaluateExpr()
|
inlineoverrideprotectedvirtual |
Construct the small integer (integer in a pointer with the low bit set to 1) value corresponding to this literal.
Implements AST::Expression.
Definition at line 149 of file ast.hh.
§ isConstantExpression()
bool AST::Number::isConstantExpression |
( |
| ) |
|
|
inlineoverridevirtual |
§ value
int64_t AST::Number::value |
The value of this literal.
MysoreScript integers are 61 bits, so a 64-bit integer is enough to store the value.
Definition at line 129 of file ast.hh.
The documentation for this struct was generated from the following files: