@Override
    public void start(@NotNull CharSequence buffer, int startOffset, int endOffset, int initialState) {
      myBuffer = buffer;
      myStartOffset = startOffset;
      myEndOffset = endOffset;
      //noinspection MagicConstant
      myState = initialState % ( 1 << STATE_SHIFT);

      if ((myState & NON_ZERO_INDENTATION) != 0)
        throw new IllegalStateException("Cannot restart lexer if there is non-zero indentation.");

      myTokenEnd = startOffset;

      if (myState == DELEGATE_IS_LEXING_LINE || myState == DELEGATE_IS_LEXING_BLOCK) {
        myTokenEnd = (myState == DELEGATE_IS_LEXING_LINE)
                     ? findEol(startOffset)
                     : findEndByIndent(startOffset);
        myDelegate.start(buffer, startOffset, myTokenEnd, getDelegateState(initialState >> STATE_SHIFT));
      }
      else
      {
        myDelegate.start(buffer, startOffset, startOffset, getDelegateState(0));
        advance();
      }
    }
@Override
    public void start(@NotNull CharSequence buffer, int startOffset, int endOffset, int initialState)