A work-in-progress SQL parser written in TypeScript
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

token.ts 526B

1234567891011121314151617181920212223242526
  1. export enum TokenKind {
  2. BACKTICK = "BACKTICK",
  3. COMMA = "COMMA",
  4. DOT = "DOT",
  5. EOF = "EOF",
  6. EQUALS = "EQUALS",
  7. FROM = "FROM",
  8. IDENTIFIER = "IDENTIFIER",
  9. NUMBER = "NUMBER",
  10. SELECT = "SELECT",
  11. SEMICOLON = "SEMICOLON",
  12. STAR = "STAR",
  13. WHERE = "WHERE",
  14. }
  15. export default class Token {
  16. public kind: TokenKind;
  17. public value: string | null;
  18. public line: number;
  19. constructor(kind: TokenKind, value: string | null, line: number) {
  20. this.kind = kind;
  21. this.value = value;
  22. this.line = line;
  23. }
  24. }