     @getIncludedPatterns().forEach (pattern) =>
       if pattern.anchored
         anchored = true
-        regex = pattern.replaceAnchor(firstLine, position, @anchor)
+        regex = pattern.replaceAnchor(firstLine, position, @anchorPosition)
       else
         regex = pattern.regexSource
       regexes.push regex if regex

        tokens = [new Token(value: line[start...end], scopes: scopes)]
    if @pushRule
      ruleToPush = @pushRule.getRuleToPush(line, captureIndices)
      ruleToPush.anchor = captureIndices[2]
      stack.push(ruleToPush)
    else if @popRule
      stack.pop()

        ))
        break

    ruleStack.forEach (rule) -> rule.clearAnchorPosition()
    { tokens, ruleStack }

  ruleForInclude: (name) ->
