addToken1 method

void addToken1(
  1. TokenType type,
  2. Object? literal
)

Implementation

void addToken1(TokenType type, Object? literal) {
  String text = source.substring(start, current);
  tokens.add(Token(type, text, literal, line, sourceFile: sourceFile));
}