Class: Oktest::Visitor

Inherits:
Object
  • Object
show all
Defined in:
lib/oktest.rb

Direct Known Subclasses

Filter, Runner, Traverser

Instance Method Summary collapse

Instance Method Details

#startObject



1539
1540
1541
1542
1543
# File 'lib/oktest.rb', line 1539

def start()
  #; [!8h8qf] start visiting tree.
  #visit_scope(THE_GLOBAL_SCOPE, -1, nil)
  THE_GLOBAL_SCOPE.each_child {|c| c.accept_visitor(self, 0, nil) }
end

#visit_scope(scope, depth, parent) ⇒ Object



1545
1546
1547
1548
# File 'lib/oktest.rb', line 1545

def visit_scope(scope, depth, parent)
  #; [!hebhz] visits each child scope.
  scope.each_child {|c| c.accept_visitor(self, depth+1, scope) }
end

#visit_spec(spec, depth, parent) ⇒ Object



1555
1556
1557
# File 'lib/oktest.rb', line 1555

def visit_spec(spec, depth, parent)
  #; [!9f7i9] do something on spec.
end

#visit_topic(topic, depth, parent) ⇒ Object



1550
1551
1552
1553
# File 'lib/oktest.rb', line 1550

def visit_topic(topic, depth, parent)
  #; [!mu3fn] visits each child of topic.
  topic.each_child {|c| c.accept_visitor(self, depth+1, topic) }
end