UNPKG

vuestic-ui

Version:
31 lines (30 loc) 727 B
interface TokenBase { type: string; expect: string; } interface TokenChar extends TokenBase { type: 'char'; } interface TokenRegex extends TokenBase { type: 'regex'; } interface TokenRepeated extends TokenBase { type: 'repeated'; tree: Token[]; min: number; max: number; content: string; } interface TokenGroup extends TokenBase { type: 'group'; tree: Token[]; } interface TokenOrRegex extends TokenBase { type: 'or regex'; left: Token[]; right: Token[]; } export type Token = TokenChar | TokenRegex | TokenRepeated | TokenGroup | TokenOrRegex; /** Build ast of tokens */ export declare const parseTokens: (mask: string, directlyInGroup?: boolean) => Token[]; export {};