accept method

void accept(
  1. CharStream input,
  2. LexerActionExecutor? lexerActionExecutor,
  3. int startIndex,
  4. int index,
  5. int line,
  6. int charPos,
)

Implementation

void accept(
  CharStream input,
  LexerActionExecutor? lexerActionExecutor,
  int startIndex,
  int index,
  int line,
  int charPos,
) {
  if (debug) {
    log('ACTION $lexerActionExecutor\n', level: Level.FINE.value);
  }

  // seek to after last char in token
  input.seek(index);
  this.line = line;
  charPositionInLine = charPos;

  if (lexerActionExecutor != null) {
    lexerActionExecutor.execute(recog, input, startIndex);
  }
}