Skip to content

Instantly share code, notes, and snippets.

@nchanged
Created May 21, 2019 07:33
Show Gist options
  • Save nchanged/d8f3ea50fefcd3dc6aa0ddcaf5690f44 to your computer and use it in GitHub Desktop.
Save nchanged/d8f3ea50fefcd3dc6aa0ddcaf5690f44 to your computer and use it in GitHub Desktop.
import { CharType } from "./chars";
export const CharCategory = {
TOKEN_START:
CharType.ALPHABET |
CharType.HYPHEN |
CharType.PERIOD |
CharType.COLON |
CharType.NUMBER_SIGN,
TOKEN:
CharType.ALPHABET |
CharType.DIGIT |
CharType.HYPHEN |
CharType.PERIOD |
CharType.LEFT_SQUARE_BRACKET |
CharType.RIGHT_SQUARE_BRACKET,
AT_OPERATOR: CharType.AT_SIGN,
HTTP_TOKEN_END:
CharType.SPACE |
CharType.END_OF_LINE |
CharType.RIGHT_PARENTHESIS |
CharType.RIGHT_CURLY_BRACE |
CharType.COMMA,
TOKEN_END:
CharType.SPACE |
CharType.LEFT_CURLY_BRACE |
CharType.RIGHT_CURLY_BRACE |
CharType.END_OF_LINE |
CharType.COMMA |
CharType.COLON |
CharType.SEMICOLON |
CharType.RIGHT_PARENTHESIS |
CharType.LEFT_PARENTHESIS
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment