Class: Loxxy::Ast::LoxAssignExpr
- Inherits:
-
LoxCompoundExpr
- Object
- LoxNode
- LoxCompoundExpr
- Loxxy::Ast::LoxAssignExpr
- Defined in:
- lib/loxxy/ast/lox_assign_expr.rb
Overview
This AST node represents the assignment of a value to a variable
Instance Attribute Summary collapse
-
#name ⇒ String
readonly
Variable name.
Attributes inherited from LoxCompoundExpr
Attributes inherited from LoxNode
Instance Method Summary collapse
-
#initialize(aPosition, aName, aValue) ⇒ LoxAssignExpr
constructor
A new instance of LoxAssignExpr.
Methods inherited from LoxCompoundExpr
Methods inherited from LoxNode
Methods included from ASTVisitee
Constructor Details
#initialize(aPosition, aName, aValue) ⇒ LoxAssignExpr
Returns a new instance of LoxAssignExpr.
15 16 17 18 |
# File 'lib/loxxy/ast/lox_assign_expr.rb', line 15 def initialize(aPosition, aName, aValue) super(aPosition, [aValue]) @name = aName end |
Instance Attribute Details
#name ⇒ String (readonly)
Returns variable name.
10 11 12 |
# File 'lib/loxxy/ast/lox_assign_expr.rb', line 10 def name @name end |