接口 ITokenTypeRemapper

函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface ITokenTypeRemapper
  • 方法概要

    修饰符和类型
    方法
    说明
    filter(IElementType source, int start, int end, CharSequence text)
    An external hook to see and alter token types reported by lexer.
  • 方法详细资料

    • filter

      IElementType filter(IElementType source, int start, int end, CharSequence text)
      An external hook to see and alter token types reported by lexer. A lexer might take a delegate implementing this interface.
      参数:
      source - type of an element as lexer understood it.
      start - start index of lexeme in text (as lexer.getTokenStart() would return).
      end - end index of lexeme in text (as lexer.getTokenEnd() would return).
      text - text being parsed.
      返回:
      altered (or not) element type.