Class: Loxxy::Ast::LoxNode

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aPosition) ⇒ LoxNode



10
11
12
# File 'lib/loxxy/ast/lox_node.rb', line 10

def initialize(aPosition)
  @position = aPosition
end

Instance Attribute Details

#positionObject (readonly)

return [Rley::Lexical::Position] Position of the entry in the input stream.



7
8
9
# File 'lib/loxxy/ast/lox_node.rb', line 7

def position
  @position
end

Instance Method Details

#accept(_visitor) ⇒ Object

Abstract method. Part of the 'visitee' role in Visitor design pattern.

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/loxxy/ast/lox_node.rb', line 22

def accept(_visitor)
  raise NotImplementedError
end

#done!Object

Notification that the parsing was successfully completed



15
16
17
# File 'lib/loxxy/ast/lox_node.rb', line 15

def done!
  # Default: do nothing ...
end