 # ----------------------------------------------------------------------------
 
 ###
-# Walker:
+# BuilderBase:
 # Traverses a JavaScript AST.
 #
 #     class MyWalker extends Walker

  {code, ast, map}

js2coffee.transform = (ast, options = {}) ->
  FunctionTransformer.run(ast, options)
  OtherTransformer.run(ast, options)

js2coffee.codegen = (ast, options = {}) ->
  new Builder(ast, options).get()

# ----------------------------------------------------------------------------

###**
# FunctionTransforms:
# Reorders functions.
#
# * Moves function definitions (`function x(){}`) to the top of the scope and
#   turns them into variable declarations (`x = -> ...`).
#
# * Moves named function expressions (`setTimeout(function tick(){})`) to the
#   top of the scope.
###

class FunctionTransforms extends TransformerBase
  onScopeEnter: (scope, ctx) ->
    ctx.prebody = []

