ESCGrammarExprs.Logical
Extends: ESCGrammarExpr
Description
Represents a logical expression. The left-hand side (LHS) is evaluated against the right-hand side (RHS) using a predicate with a determination of truth being returned. Both sides must themselves evaluate to a boolean. Examples include AND, OR.
Members
Methods
init
func init(left: ESCGrammarExpr, operator: ESCToken, right: ESCGrammarExpr) -> void
Initialization method. Must be called after instantiation.
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
left |
|
Left-hand operand expression. |
yes |
operator |
|
Token representing the operator applied to the operands. |
yes |
right |
|
Right-hand operand expression. |
yes |
Returns
Returns nothing.
get_left
func get_left() -> ESCGrammarExpr
The LHS of the logical expression.
Parameters
None.
Returns
Returns the LHS of the logical expression. (ESCGrammarExpr)
get_right
func get_right() -> ESCGrammarExpr
The RHS of the logical expression.
Parameters
None.
Returns
Returns the RHS of the logical expression. (ESCGrammarExpr)
get_operator
func get_operator() -> ESCToken
The operator (predicate) of the logical expression.
Parameters
None.
Returns
Returns the operator (predicate) of the logical expression. (ESCToken)
accept
func accept(visitor: Variant) -> Variant
Method to invoke visitor-specific code.
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
visitor |
|
Visitor instance invoked to process this expression. |
yes |
Returns
Returns nothing.