       index = template.indexOf '{{', lastIndex
 
       if index < 0
-        tokens.push type: types.text, value: template.slice lastIndex
+        tokens.push type: @types.text, value: template.slice lastIndex
         break
       else
         if index > 0 and lastIndex < index
-          tokens.push type: types.text, value: template.slice lastIndex, index
+          tokens.push type: @types.text, value: template.slice lastIndex, index
 
         lastIndex = index + 2
         index = template.indexOf '}}', lastIndex

# Rivets.js text template parser and tokenizer for mustache-style text content
# binding declarations.
class Rivets.TextTemplateParser
  types =
    text: 0
    binding: 1


    parse = (node) =>
      unless node in skipNodes
        if node.nodeType is Node.TEXT_NODE
          parser = Rivets.TextTemplateParser

          if (tokens = parser.parse node.data).length
            unless tokens.length is 1 and tokens[0].type is parser.types.text
              [startToken, restTokens...] = tokens
              node.data = startToken.value

              switch startToken.type
