Class: Loxxy::Ast::LoxLiteralExpr

Inherits:
LoxNode
  • Object
show all
Defined in:
lib/loxxy/ast/lox_literal_expr.rb

Instance Attribute Summary collapse

Attributes inherited from LoxNode

#position

Instance Method Summary collapse

Methods inherited from LoxNode

#accept, #done!

Methods included from ASTVisitee

#define_accept, #snake_case

Constructor Details

#initialize(aPosition, aLiteral) ⇒ LoxLiteralExpr

Returns a new instance of LoxLiteralExpr.

Parameters:



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

#literalLoxxy::Datatype::BuiltinDatatype (readonly)



9
10
11
# File 'lib/loxxy/ast/lox_literal_expr.rb', line 9

def literal
  @literal
end