@Override
    public IElementType getTokenType() {
      try {
        return mySegments.unpackTokenFromData(mySegments.getSegmentData(mySegmentIndex));
      }
      catch (IllegalStateException e) {
        throw new InvalidStateException(LexerEditorHighlighter.this, "wrong state", e);
      }
    }
@Override
    public IElementType getTokenType()