@csstools/css-tokenizer
Advanced tools
Comparing version
# Changes to CSS Tokenizer | ||
### 2.4.0 | ||
_July 5, 2024_ | ||
- Expose `ParseErrorMessage`, the list of known parser error messages object to facilitate detection of specific cases | ||
- Add a specific `ParseErrorWithToken` subclass. This contains the associated token. | ||
### 2.3.3 | ||
@@ -15,8 +22,2 @@ | ||
### 2.3.1 | ||
_May 4, 2024_ | ||
- Fix escaping for the last code point in an ident sequence. | ||
[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md) |
@@ -215,5 +215,24 @@ /** | ||
parserState: Array<string>; | ||
/** The associated AST node. */ | ||
astNode?: unknown; | ||
constructor(message: string, sourceStart: number, sourceEnd: number, parserState: Array<string>); | ||
} | ||
export declare const ParseErrorMessage: { | ||
UnexpectedNewLineInString: string; | ||
UnexpectedEOFInString: string; | ||
UnexpectedEOFInComment: string; | ||
UnexpectedEOFInURL: string; | ||
UnexpectedEOFInEscapedCodePoint: string; | ||
UnexpectedCharacterInURL: string; | ||
InvalidEscapeSequenceInURL: string; | ||
InvalidEscapeSequenceAfterBackslash: string; | ||
}; | ||
export declare class ParseErrorWithToken extends ParseError { | ||
/** The associated token. */ | ||
token: CSSToken; | ||
constructor(message: string, sourceStart: number, sourceEnd: number, parserState: Array<string>, token: CSSToken); | ||
} | ||
/** | ||
@@ -220,0 +239,0 @@ * @internal |
{ | ||
"name": "@csstools/css-tokenizer", | ||
"description": "Tokenize CSS", | ||
"version": "2.3.3", | ||
"version": "2.4.0", | ||
"contributors": [ | ||
@@ -6,0 +6,0 @@ { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
74094
3.91%746
3.47%