Class: Loxxy::Ast::LoxLiteralExpr
- Defined in:
- lib/loxxy/ast/lox_literal_expr.rb
Instance Attribute Summary collapse
Attributes inherited from LoxNode
Instance Method Summary collapse
-
#accept(visitor) ⇒ Object
Part of the 'visitee' role in Visitor design pattern.
-
#initialize(aPosition, aLiteral) ⇒ LoxLiteralExpr
constructor
A new instance of LoxLiteralExpr.
Methods inherited from LoxNode
Constructor Details
#initialize(aPosition, aLiteral) ⇒ LoxLiteralExpr
Returns a new instance of LoxLiteralExpr.
13 14 15 16 |
# File 'lib/loxxy/ast/lox_literal_expr.rb', line 13 def initialize(aPosition, aLiteral) super(aPosition) @literal = aLiteral end |
Instance Attribute Details
#literal ⇒ Loxxy::Datatype::BuiltinDatatype (readonly)
9 10 11 |
# File 'lib/loxxy/ast/lox_literal_expr.rb', line 9 def literal @literal end |
Instance Method Details
#accept(visitor) ⇒ Object
Part of the 'visitee' role in Visitor design pattern.
20 21 22 |
# File 'lib/loxxy/ast/lox_literal_expr.rb', line 20 def accept(visitor) visitor.visit_literal_expr(self) end |