tokenKind.js.flow 637 B

1234567891011121314151617181920212223242526272829303132333435
  1. // @flow strict
  2. /**
  3. * An exported enum describing the different kinds of tokens that the
  4. * lexer emits.
  5. */
  6. export const TokenKind = Object.freeze({
  7. SOF: '<SOF>',
  8. EOF: '<EOF>',
  9. BANG: '!',
  10. DOLLAR: '$',
  11. AMP: '&',
  12. PAREN_L: '(',
  13. PAREN_R: ')',
  14. SPREAD: '...',
  15. COLON: ':',
  16. EQUALS: '=',
  17. AT: '@',
  18. BRACKET_L: '[',
  19. BRACKET_R: ']',
  20. BRACE_L: '{',
  21. PIPE: '|',
  22. BRACE_R: '}',
  23. NAME: 'Name',
  24. INT: 'Int',
  25. FLOAT: 'Float',
  26. STRING: 'String',
  27. BLOCK_STRING: 'BlockString',
  28. COMMENT: 'Comment',
  29. });
  30. /**
  31. * The enum type representing the token kinds values.
  32. */
  33. export type TokenKindEnum = $Values<typeof TokenKind>;