A stylesheet language written in TypeScript that compiles to CSS
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.

12345678910111213141516171819202122232425262728293031
  1. export enum TokenTypes {
  2. COMMA = 'comma',
  3. COMMENT = 'comment',
  4. EOF = 'eof',
  5. FUNCTION_NAME = 'function name',
  6. IDENTIFIER = 'identifier',
  7. LITERAL = 'literal',
  8. LPAREN = 'lparen',
  9. PROPERTY = 'property',
  10. RPAREN = 'rparen',
  11. WHITESPACE = 'whitespace',
  12. }
  13. export default class Token {
  14. public type: TokenTypes;
  15. public value: string;
  16. public line: number;
  17. public module?: string;
  18. public constructor(
  19. type: TokenTypes,
  20. value: string,
  21. line: number,
  22. module?: string
  23. ) {
  24. this.type = type;
  25. this.value = value;
  26. this.line = line;
  27. this.module = module;
  28. }
  29. }