Token
class Token
This class represents one token of an arithmetic or a logical expression.
Constants
T_UNDEFINED |
|
T_NUMBER |
|
T_DATE |
|
T_BOOLEAN |
|
T_TEXT |
|
T_ANY |
|
T_IDENT |
|
T_FUNCTION |
|
T_ARRAY |
|
T_POPEN |
|
T_PCLOSE |
|
T_SBOPEN |
|
T_SBCLOSE |
|
T_COMMA |
|
T_NOOP |
|
T_PLUS |
|
T_MINUS |
|
T_TIMES |
|
T_DIV |
|
T_MOD |
|
T_POW |
|
T_UNARY_PLUS |
|
T_UNARY_MINUS |
|
T_NOT |
|
T_FIELD |
|
T_EQUAL |
|
T_NOT_EQUAL |
|
T_LESS_THAN |
|
T_LESS_OR_EQUAL |
|
T_GREATER_THAN |
|
T_GREATER_OR_EQUAL |
|
T_CONTAINS |
|
T_NOT_CONTAINS |
|
T_BITWISE_AND |
|
T_BITWISE_OR |
|
T_BITWISE_XOR |
|
T_LOGICAL_AND |
|
T_LOGICAL_OR |
|
T_TERNARY |
|
T_TERNARY_ELSE |
|
T_DEGRE |
|
A_NONE |
|
A_LEFT |
|
A_RIGHT |
|
Properties
int | $type | ||
string | $value |
Methods
Constructor of class Token
Determines whether this token represents an unary operator or not.
Determines whether this token represents a binary operator or not.
Determines whether this token represents a ternary operator or not.
Determines whether this token represents an operator or not.
Determines whether this token represents a comparison operator or not.
Determines whether this token represents a variable identifier or not.
Determines whether this token represents an undefined value or not.
Determines whether this token is just before a function argument or not.
Returns the priority of the operator represented by this token
Determines if the operator represented by this token is right-associative, left-associative or non-associative
Returns a string representation of this token.
Details
at line 109
void
__construct(int $type, string $value)
Constructor of class Token
at line 121
bool
isUnaryOperator()
Determines whether this token represents an unary operator or not.
at line 140
bool
isBinaryOperator()
Determines whether this token represents a binary operator or not.
at line 165
bool
isTernaryOperator()
Determines whether this token represents a ternary operator or not.
at line 180
bool
isOperator()
Determines whether this token represents an operator or not.
at line 193
bool
isComparator()
Determines whether this token represents a comparison operator or not.
at line 215
bool
isVariable()
Determines whether this token represents a variable identifier or not.
at line 232
bool
isUndefined()
Determines whether this token represents an undefined value or not.
at line 243
bool
isBeforeFunctionArgument()
Determines whether this token is just before a function argument or not.
at line 260
int
precedence()
Returns the priority of the operator represented by this token
at line 316
int
associativity()
Determines if the operator represented by this token is right-associative, left-associative or non-associative
at line 360
string
__toString()
Returns a string representation of this token.