     else
       0
 
-  parseNodes: (node) ->
-    while node
+  parseTree: (root) ->
+    while root
       if @deferEvery && (new Date - @startTime) > @deferEvery
-        @resumeNode = node
+        @resumeNode = root
         @timeout = Batman.setImmediate @resume
         return
-      skipChildren = @parseNode(node)
 
-      node = @nextNode( node, skipChildren )
+      skipChildren = @parseNode(root)
+      root = @nextNode(root, skipChildren)
+
     @finish()
 
   parseNode: (node) ->

    @startTime = new Date
    @prevent 'parsed'
    @prevent 'rendered'
    @parseNodes @node

  resume: =>
    @startTime = new Date
    @parseNodes @resumeNode

  finish: ->
    @startTime = null


  for k in ['parsed', 'rendered', 'stopped']
    @::event(k).oneShot = true

  bindingSortOrder = ["view", "renderif", "foreach", "formfor", "context", "bind", "source", "target"]

