 #       ....
 #    }
 # 
-class HoistVars extends NodeVisitor
+class HoistVars extends TreeTransformer
         constructor: () ->
                 super
                 @function_stack = new Stack


{ Stack } = require 'stack'
{ Set } = require 'set'
{ NodeVisitor } = require 'nodevisitor'

echo_util = require 'echo-util'
genGlobalFunctionName = echo_util.genGlobalFunctionName


# this should move to echo-desugar.coffee

class HoistFuncDecls extends TreeTransformer
        constructor: ->
                @prepends = []
                
