class Crokus::Ast

Public Instance Methods

accept(visitor, arg=nil) click to toggle source
# File lib/crokus/ast.rb, line 5
def accept(visitor, arg=nil)
  name = self.class.name.split(/::/)[1]
  visitor.send("visit#{name}".to_sym, self ,arg) # Metaprograming !
end
str() click to toggle source
# File lib/crokus/ast.rb, line 10
def str
  ppr=PrettyPrinter.new
  self.accept(ppr)
end