Class: Loxxy::Ast::LoxSetExpr
- Inherits:
-
LoxCompoundExpr
- Object
- LoxNode
- LoxCompoundExpr
- Loxxy::Ast::LoxSetExpr
- Defined in:
- lib/loxxy/ast/lox_set_expr.rb
Instance Attribute Summary collapse
-
#object ⇒ Ast::LoxNode
readonly
The object to which the property belongs to.
-
#property ⇒ String
Name of an object property.
Attributes inherited from LoxCompoundExpr
Attributes inherited from LoxNode
Instance Method Summary collapse
-
#accept(visitor) ⇒ Object
Part of the 'visitee' role in Visitor design pattern.
-
#initialize(aPosition, anObject) ⇒ LoxSetExpr
constructor
A new instance of LoxSetExpr.
Methods inherited from LoxNode
Constructor Details
#initialize(aPosition, anObject) ⇒ LoxSetExpr
Returns a new instance of LoxSetExpr.
16 17 18 19 |
# File 'lib/loxxy/ast/lox_set_expr.rb', line 16 def initialize(aPosition, anObject) super(aPosition, []) @object = anObject end |
Instance Attribute Details
#object ⇒ Ast::LoxNode (readonly)
Returns the object to which the property belongs to.
9 10 11 |
# File 'lib/loxxy/ast/lox_set_expr.rb', line 9 def object @object end |
#property ⇒ String
Returns Name of an object property.
12 13 14 |
# File 'lib/loxxy/ast/lox_set_expr.rb', line 12 def property @property end |
Instance Method Details
#accept(visitor) ⇒ Object
Part of the 'visitee' role in Visitor design pattern.
23 24 25 |
# File 'lib/loxxy/ast/lox_set_expr.rb', line 23 def accept(visitor) visitor.visit_set_expr(self) end |