Source

SmallCC / src / prettyprint.ml

Full commit
class prettyPrintVisitor =
  object(this)
    
    inherit Visitor.visitor as old

    method accept_function_definition a b c d =
      print_endline ("Function: " ^ (this#getFuncName (Visitor.getValue b)));
      old#accept_function_definition a b c d

  end

let visite ast =
  let a = new prettyPrintVisitor in
    a#visite_translation_unit ast