ESCGrammarExprs.Assign
Extends: ESCGrammarExpr
Description
Represents an assignment expression. For example, assigning a value to a variable.
Members
Methods
init
func init(name: ESCToken, value: ESCGrammarExpr) -> void
Initialization method. Must be called after instantiation.
Parameters
Name |
Type |
Description |
Required? |
|---|---|---|---|
name |
|
Token representing the variable’s name to assign. |
yes |
value |
|
the value to assign to the variable; must be an expression itself |
yes |
Returns
Returns nothing.
get_name
func get_name() -> ESCToken
The variables name (as an ESCToken).
Parameters
None.
Returns
Returns the variables name (as an ESCToken). (ESCToken)
get_value
func get_value() -> ESCGrammarExpr
The value (as an expression) to be assigned to the variable.
Parameters
None.
Returns
Returns the value (as an expression) to be assigned to the variable. (ESCGrammarExpr)
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 the result of visiting this assignment expression. (Variant)