Class: Brainfucktt::Language::Tree

Inherits:
Node
  • Object
show all
Defined in:
lib/brainfucktt/language/tree.rb

Overview

The syntax tree of the source code or loop.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#elements, #inspect, #to_s

Instance Attribute Details

#dataObject

Returns the value of attribute data.



8
9
10
# File 'lib/brainfucktt/language/tree.rb', line 8

def data
  @data
end

Instance Method Details

#run(parser) ⇒ Object

Run the code.



11
12
13
# File 'lib/brainfucktt/language/tree.rb', line 11

def run(parser)
  elements.each { |element| element.run(parser) }
end