     @estraverse().replace root,
       enter: (node, parent) ->
         self.controller = this
+        self.node = node
         depth += 1
         fn = self["#{node.type}"]
-        res = (fn.apply(self, [ node, parent, (=> @skip()), (=> @break()) ]) if fn)
+        self.onBeforeEnter?(node, depth, fn, res)
+        res = (fn.apply(self, [ node, parent ]) if fn)
         self.onEnter?(node, depth, fn, res)
         res
       leave: (node, parent) ->
         self.controller = this
+        self.node = node
+        depth -= 1
         fn = self["#{node.type}Exit"]
-        res = (fn.apply(self, [ node, parent, (=> @skip()), (=> @break()) ]) if fn)
+        self.onBeforeExit?(node, depth, fn, res)
+        res = (fn.apply(self, [ node, parent ]) if fn)
         self.onExit?(node, depth, fn, res)
-        depth -= 1
         res
     root
 

class OtherTransformer extends TransformerBase
  Program: (node) ->
    @pushStack node
  ProgramExit: (node) ->
    @popStack()
  BlockStatementExit: (node) ->
    @removeEmptyStatementsFromBody node
  FunctionDeclaration: (node, parent) ->
    throw new Error("FnDecl: Not supposed to happen") # it's supposed to be eaten by fixScope
  FunctionDeclarationExit: (node) ->
    @popStack()
  FunctionExpression: (node, parent) ->
    throw new Error("NamedFnExpr: Not supposed to happen") if node.id # fixScope should've gotten this case
    @pushStack node.body
    @removeUndefinedParameter node
  FunctionExpressionExit: (node) ->
    @popStack()
  SwitchStatement: (node) ->
    @consolidateCases node
  SwitchCase: (node) ->
    @removeBreaksFromConsequents node
  CallExpression: (node) ->
    @parenthesizeCallee node
  MemberExpression: (node) ->
    @transformThisToAtSign(node)
    @replaceWithPrototype(node) or
    @parenthesizeObjectIfFunction node
  CoffeePrototypeExpression: (node) ->
    @transformThisToAtSign(node)
  Identifier: (node) ->
    @escapeUndefined node
  BinaryExpression: (node) ->
    @updateBinaryExpression node
  UnaryExpression: (node) ->
    @updateVoidToUndefined node
  LabeledStatement: (node, parent) ->
    @warnAboutLabeledStatements node, parent
  WithStatement: (node) ->
    @syntaxError node, "'with' is not supported in CoffeeScript"
  VariableDeclarator: (node) ->
    @addShadowingIfNeeded(node)
    @addExplicitUndefinedInitializer node

  ###
  # Remove `{type: 'EmptyStatement'}` from the body.

    else
      ""

  TransformerBase::onBeforeEnter = (node, depth, fn) ->
    console.log Array(depth+1).join("  "), node.type, (if fn then "*" else ""), isDead(@ast)

  TransformerBase::onBeforeExit = (node, depth, fn) ->
    console.log Array(depth+1).join("  "), ""+node.type+"Exit", (if fn then "*" else ""), isDead(@ast)

# js2coffee.debug()
