Class: Loxxy::Ast::LoxUnaryExpr
- Inherits:
-
LoxCompoundExpr
- Object
- LoxNode
- LoxCompoundExpr
- Loxxy::Ast::LoxUnaryExpr
- Defined in:
- lib/loxxy/ast/lox_unary_expr.rb
Instance Attribute Summary collapse
-
#operator ⇒ Symbol
readonly
Message name to be sent to receiver.
Attributes inherited from LoxCompoundExpr
Attributes inherited from LoxNode
Instance Method Summary collapse
-
#initialize(aPosition, anOperator, operand) ⇒ LoxUnaryExpr
constructor
A new instance of LoxUnaryExpr.
Methods inherited from LoxCompoundExpr
Methods inherited from LoxNode
Methods included from ASTVisitee
Constructor Details
#initialize(aPosition, anOperator, operand) ⇒ LoxUnaryExpr
Returns a new instance of LoxUnaryExpr.
13 14 15 16 |
# File 'lib/loxxy/ast/lox_unary_expr.rb', line 13 def initialize(aPosition, anOperator, operand) super(aPosition, [operand]) @operator = anOperator end |
Instance Attribute Details
#operator ⇒ Symbol (readonly)
Returns message name to be sent to receiver.
9 10 11 |
# File 'lib/loxxy/ast/lox_unary_expr.rb', line 9 def operator @operator end |