@Override
  protected int getTokenEnd(int position) {
    boolean escaped = false;
    for(; position < myEndOffset; position++) {
      final char c = myBuffer.charAt(position);
      final boolean escapedStatus = escaped;

      if (myAllowEscapes && c == '\\') {
        escaped = !escaped;
      }

      if(!escaped && c == myQuote) return position + 1;
      if(c == '\n') return position;
      if (escapedStatus && escaped) {
        escaped = false;
      }
    }
    return position;
  }
@Override
  protected int getTokenEnd(int position)