mirror of
https://github.com/tenrok/BBob.git
synced 2026-06-14 18:42:24 +03:00
* chore: initial tests * feat: parser test * feat: add case free tags support * fix: coverage upload * fix: --disable=gcov * fix: npm publish sha commit * fix: change codecov to coveralls * fix: change workflow pr build and publish * chore: change coverage badge [skip ci]
This commit is contained in:
@@ -23,24 +23,23 @@ export interface Token<TokenValue = string> {
|
||||
|
||||
export interface LexerTokenizer {
|
||||
tokenize: () => Token<string>[];
|
||||
isTokenNested?: (token: Token<string>) => boolean;
|
||||
isTokenNested?: (tokenValue: string) => boolean;
|
||||
}
|
||||
|
||||
export interface LexerOptions {
|
||||
export interface CommonOptions {
|
||||
openTag?: string;
|
||||
closeTag?: string;
|
||||
onlyAllowTags?: string[];
|
||||
enableEscapeTags?: boolean;
|
||||
caseFreeTags?: boolean;
|
||||
contextFreeTags?: string[];
|
||||
}
|
||||
|
||||
export interface LexerOptions extends CommonOptions {
|
||||
onToken?: (token?: Token<string>) => void;
|
||||
}
|
||||
|
||||
export interface ParseOptions {
|
||||
export interface ParseOptions extends CommonOptions {
|
||||
createTokenizer?: (input: string, options?: LexerOptions) => LexerTokenizer;
|
||||
openTag?: string;
|
||||
closeTag?: string;
|
||||
onlyAllowTags?: string[];
|
||||
contextFreeTags?: string[];
|
||||
enableEscapeTags?: boolean;
|
||||
onError?: (error: ParseError) => void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user