     EmitterMixin::on.apply(this, arguments)
 
 class TokenizeLineResult
-  constructor: (@line, @tags, @ruleStack, @registry) ->
+  constructor: (@line, @openScopeTags, @tags, @ruleStack, @registry) ->
 
   Object.defineProperty @prototype, 'tokens', get: ->
-    @registry.decodeTokens(@line, @tags)
+    @registry.decodeTokens(@line, @tags, @openScopeTags)

  # * `ruleStack` An {Array} of rules representing the tokenized state at the
  #   end of the line. These should be passed back into this method when
  #   tokenizing the next line in the file.
  tokenizeLine: (line, ruleStack, firstLine=false) ->
    tags = []

    if ruleStack?
      ruleStack = ruleStack.slice()
    else
      initialRule = @getInitialRule()
      ruleStack = [initialRule]
      tags.push(@idForScope(initialRule.scopeName)) if initialRule.scopeName

            break

    rule.clearAnchorPosition() for rule in ruleStack

    if compatibilityMode
      new TokenizeLineResult(line, openScopeTags, tags, ruleStack, @registry)
    else
      {line, tags, ruleStack}

  activate: ->
    @registration = @registry.addGrammar(this)
