                 @function_stack.shift()
                 n
 
+        visitFor: (n) ->
+                @skipExpressionStatement = true
+                init = @visit n.init
+                @skipExpressionStatement = false
+                n.test = @visit n.test
+                n.update = @visit n.update
+                n.body = @visit n.body
+                n
+                        
         visitForIn: (n) ->
                 if n.left.type is syntax.VariableDeclaration
                         @function_stack[0].vars.push

        passes.forEach (passType) ->
                pass = new passType(filename)
                tree = pass.visit tree
        tree

                for decl in n.declarations
                        decl.init = @visit decl.init
                        if @currentMapping().hasOwnProperty decl.id.name
                                assignment =
                                        type: syntax.AssignmentExpression,
                                        operator: "="
                                        left:
                                                type: syntax.CallExpression
                                                callee: create_identifier "%slot"
                                                arguments: [ @currentMapping()["%env"], (create_number_literal @currentMapping()["%slot_mapping"][decl.id.name]) ]
                                        right: decl.init || { type: syntax.Identifier, name: "undefined" }
                                
                                if @skipExpressionStatement
                                        rv.push assignment
                                else
                                        rv.push {
                                                type: syntax.ExpressionStatement
                                                expression: assignment
                                        }
                        else
                                rv.push {
                                        type: syntax.VariableDeclaration
