     return 0 if regex.indexOf("\n") > -1 # no newlines in a normal regex
     # Avoid conflicts with floor division operator.
     return 0 if regex is '//'
-    @addLeafNodeToActiveBranch parseTreeLeafNode $.CS_REGEX, match
+    @addLeafNodeToActiveBranch ParseTreeLeafNode $.CS_REGEX, match
     match.length
 
   # Matches multiline extended regular expressions.


    return 0 unless selfClosing or @chunk.indexOf("</#{tagName}>", input.length) > -1

    @pushActiveBranchNode parseTreeBranchNode $.CJSX_EL, tagName
    @pushActiveBranchNode parseTreeBranchNode $.CJSX_ATTRIBUTES

    1+tagName.length



    if attrName
      if doubleQuotedVal? # "value"
        @addLeafNodeToActiveBranch ParseTreeBranchNode($.CJSX_ATTR_PAIR, null, [
          ParseTreeLeafNode($.CJSX_ATTR_KEY, "\"#{attrName}\"")
          ParseTreeLeafNode($.CJSX_ATTR_VAL, "\"#{doubleQuotedVal}\"")
        ])
        return input.length
      else if singleQuotedVal? # 'value'
        @addLeafNodeToActiveBranch ParseTreeBranchNode($.CJSX_ATTR_PAIR, null, [
          ParseTreeLeafNode($.CJSX_ATTR_KEY, "\"#{attrName}\"")
          ParseTreeLeafNode($.CJSX_ATTR_VAL, "'#{singleQuotedVal}'")
        ])
        return input.length
      else if cjsxEscVal # {value}
        @pushActiveBranchNode ParseTreeBranchNode $.CJSX_ATTR_PAIR
        @addLeafNodeToActiveBranch ParseTreeLeafNode($.CJSX_ATTR_KEY, "\"#{attrName}\"")
        # on next iteration of parse loop, '{' will trigger CJSX_ESC state
        return input.indexOf('{') # consume up to start of cjsx escape
      else if bareVal # value
        @addLeafNodeToActiveBranch ParseTreeBranchNode($.CJSX_ATTR_PAIR, null, [
          ParseTreeLeafNode($.CJSX_ATTR_KEY, "\"#{attrName}\"")
          ParseTreeLeafNode($.CJSX_ATTR_VAL, bareVal)
        ])
        return input.length
      else # valueless attr
        @addLeafNodeToActiveBranch ParseTreeBranchNode($.CJSX_ATTR_PAIR, null, [
          ParseTreeLeafNode($.CJSX_ATTR_KEY, "\"#{attrName}\"")
          ParseTreeLeafNode($.CJSX_ATTR_VAL, 'true')
        ])
        return input.length
    else if spreadAttr # {... x, y}
      @pushActiveBranchNode ParseTreeBranchNode $.CJSX_ATTR_SPREAD
      # on next iteration of parse loop, '{' will trigger CJSX_ESC state and be
      # parsed as CJSX_ESC (which has similar properties), to be transformed later
      return input.indexOf('{')
    else if whitespace?
      @addLeafNodeToActiveBranch ParseTreeLeafNode($.CJSX_WHITESPACE, whitespace)
      return input.length
    else
      throwSyntaxError \
