2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-06-14 18:42:24 +03:00

feat(#250): introduce caseFreeTags option (#251)

* 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:
Nikolay Kost
2024-10-17 00:26:06 +03:00
committed by GitHub
parent 99c629e666
commit ccab54a454
12 changed files with 293 additions and 160 deletions
+7 -8
View File
@@ -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;
}