Class ALinearCExpression
Unit
linearc
Declaration
type ALinearCExpression = class(AParsedLanguageParser)
Description
This class represents an expression in LinearC. An expression can be made up of a numeric value, a boolean value, or a subexpression (delimited by parentheses).
Hierarchy
Overview
Fields
Methods
Description
Fields
 |
myValue: Variant; |
|
Stores the value of the expression
|
Methods
 |
constructor forSource(const ThisParent: AParser); overload; override; |
|
Construct a new expression parser that will use the same scanner and token list as the specified parser.
The new expression inherits all of the properties of ThisParser.
|
 |
function init: boolean; override; |
|
Initializer
|
 |
destructor destroy; override; |
|
Destroy the expression parser.
This method nils its reference to the parent's token list to prevent the inherited routine from freeing it (since the reference is borrowed). It then calls the inherited routine.
|
 |
function parse: int64; override; |
|
Parse the expression.
This method checks Self.CurrentToken and, based on the value of the opcode, this method will construct an instance of:
The value returned from the subexpression will be assigned to Self.value.
Returns
The number of errors encountered while parsing. |
 |
function toString: AnsiString; override; |
|
Construct and return a string representation of the expression, suitable for output to a text-based device such as a console.
This method calls Variants.varToStr on Self.value and returns the result.
|
 |
function value: Variant; virtual; |
|
Retrieve the current value of the expression.
This value is calculated as the expression is parsed and cannot otherwise be changed.
|
 |
function Options: ACommandLineOptionDictionary; virtual; |
|
Retrieve a reference to the list of command line options with which the expression works.
The caller should NOT attempt to free the reference returned by this routine.
|
Generated by PasDoc 0.13.0 on 2015-01-10 17:13:18
|