parseChar function

Token? parseChar(
  1. String input,
  2. int index,
  3. int line,
  4. int column,
)

Implementation

Token? parseChar(String input, int index, int line, int column) {
  final char = input[index];
  if (punctuatorTokensMap.containsKey(char)) {
    final tokenType = punctuatorTokensMap[char];
    return new Token(tokenType, line, column + 1, index + 1, null);
  }

  return null;
}