@dbml/parse
Version:
> TODO: description
46 lines (45 loc) • 1.58 kB
TypeScript
import { Position } from '../types';
export declare enum SyntaxTokenKind {
SPACE = "<space>",
TAB = "<tab>",
NEWLINE = "<newline>",
COMMA = "<comma>",
LPAREN = "<lparen>",
RPAREN = "<rparen>",
LBRACE = "<lbrace>",
RBRACE = "<rbrace>",
LBRACKET = "<lbracket>",
RBRACKET = "<rbracket>",
LANGLE = "<langle>",
RANGLE = "<rangle>",
OP = "<op>",
EOF = "<eof>",
NUMERIC_LITERAL = "<number>",
STRING_LITERAL = "<string>",
COLOR_LITERAL = "<color>",
FUNCTION_EXPRESSION = "<function-expression>",
QUOTED_STRING = "<variable>",
IDENTIFIER = "<identifier>",
SEMICOLON = "<semicolon>",
COLON = "<colon>",
SINGLE_LINE_COMMENT = "<single-line-comment>",
MULTILINE_COMMENT = "<multiline-comment>"
}
export declare function isTriviaToken(token: SyntaxToken): boolean;
export declare function isOp(c?: string): boolean;
export declare function isOpToken(token?: SyntaxToken): boolean;
export declare class SyntaxToken {
kind: SyntaxTokenKind;
value: string;
leadingTrivia: SyntaxToken[];
trailingTrivia: SyntaxToken[];
leadingInvalid: SyntaxToken[];
trailingInvalid: SyntaxToken[];
startPos: Readonly<Position>;
start: Readonly<number>;
endPos: Readonly<Position>;
end: Readonly<number>;
isInvalid: boolean;
protected constructor(kind: SyntaxTokenKind, startPos: Position, endPos: Position, value: string, isInvalid: boolean);
static create(kind: SyntaxTokenKind, startPos: Position, endPos: Position, value: string, isInvalid: boolean): SyntaxToken;
}