mirror of
https://github.com/CamHenlin/MessagesForMacintosh.git
synced 2025-02-16 23:30:51 +00:00
34 lines
619 B
TypeScript
34 lines
619 B
TypeScript
/**
|
|
* An exported enum describing the different kinds of tokens that the
|
|
* lexer emits.
|
|
*/
|
|
export const TokenKind: {
|
|
SOF: '<SOF>';
|
|
EOF: '<EOF>';
|
|
BANG: '!';
|
|
DOLLAR: '$';
|
|
AMP: '&';
|
|
PAREN_L: '(';
|
|
PAREN_R: ')';
|
|
SPREAD: '...';
|
|
COLON: ':';
|
|
EQUALS: '=';
|
|
AT: '@';
|
|
BRACKET_L: '[';
|
|
BRACKET_R: ']';
|
|
BRACE_L: '{';
|
|
PIPE: '|';
|
|
BRACE_R: '}';
|
|
NAME: 'Name';
|
|
INT: 'Int';
|
|
FLOAT: 'Float';
|
|
STRING: 'String';
|
|
BLOCK_STRING: 'BlockString';
|
|
COMMENT: 'Comment';
|
|
};
|
|
|
|
/**
|
|
* The enum type representing the token kinds values.
|
|
*/
|
|
export type TokenKindEnum = typeof TokenKind[keyof typeof TokenKind];
|