UNPKG

consys

Version:

consys is a flexible tool to evaluate models using generic and readable constraints.

60 lines (59 loc) 1.22 kB
/** * All possible words of the dsl. */ export declare enum TokenType { PARENTHESIS_OPEN = 0, PARENTHESIS_CLOSE = 1, PLUS = 2, MINUS = 3, COMMA = 4, DOT = 5, COLON = 6, SLASH = 7, STAR = 8, PERCENT = 9, DOLLAR = 10, HASH = 11, EXCLAMATION_MARK = 12, EXCLAMATION_MARK_EQUAL = 13, EQUAL_EQUAL = 14, GREATER = 15, GREATER_EQUAL = 16, LESS = 17, LESS_EQUAL = 18, PIPE_PIPE = 19, AMPERSAND_AMPERSAND = 20, IDENTIFIER = 21, STRING = 22, NUMBER = 23, ALWAYS = 24, WHEN = 25, THEN = 26, IF = 27, AND = 28, OR = 29, NOT = 30, EOF = 31 } /** * Represents a word of the dsl. */ export default class Token { readonly type: TokenType; readonly lexeme: string; readonly literal: any; readonly position: number; /** * Creates a new token from data. * * @param type token type * @param lexeme token source * @param literal token value * @param position token position */ constructor(type: TokenType, lexeme: string, literal: any, position: number); /** * Returns the string representation of this token. */ toString(): string; }