Class: GDA::Visitors::MaxDepth

Inherits:
Visitor
  • Object
show all
Defined in:
lib/gda/visitors/max_depth.rb

Instance Method Summary collapse

Constructor Details

#initializeMaxDepth

Returns a new instance of MaxDepth.



6
7
8
9
10
# File 'lib/gda/visitors/max_depth.rb', line 6

def initialize
  @max     = 0
  @current = 0
  super
end

Instance Method Details

#accept(node) ⇒ Object



12
13
14
15
# File 'lib/gda/visitors/max_depth.rb', line 12

def accept node
  super
  @max
end