kindToString static method
Implementation
static String kindToString(int kind) => switch (kind) {
TokenKind.UNUSED => 'ERROR',
TokenKind.END_OF_FILE => 'end of file',
TokenKind.LPAREN => '(',
TokenKind.RPAREN => ')',
TokenKind.LBRACK => '[',
TokenKind.RBRACK => ']',
TokenKind.LBRACE => '{',
TokenKind.RBRACE => '}',
TokenKind.DOT => '.',
TokenKind.SEMICOLON => ';',
TokenKind.AT => '@',
TokenKind.HASH => '#',
TokenKind.PLUS => '+',
TokenKind.GREATER => '>',
TokenKind.TILDE => '~',
TokenKind.ASTERISK => '*',
TokenKind.NAMESPACE => '|',
TokenKind.COLON => ':',
TokenKind.PRIVATE_NAME => '_',
TokenKind.COMMA => ',',
TokenKind.SPACE => ' ',
TokenKind.TAB => '\t',
TokenKind.NEWLINE => '\n',
TokenKind.RETURN => '\r',
TokenKind.PERCENT => '%',
TokenKind.SINGLE_QUOTE => "'",
TokenKind.DOUBLE_QUOTE => '"',
TokenKind.SLASH => '/',
TokenKind.EQUALS => '=',
TokenKind.CARET => '^',
TokenKind.DOLLAR => '\$',
TokenKind.LESS => '<',
TokenKind.BANG => '!',
TokenKind.MINUS => '-',
TokenKind.BACKSLASH => '\\',
_ => throw StateError('Unknown TOKEN')
};