@lezer/css
Advanced tools
+6
-0
@@ -0,1 +1,7 @@ | ||
| ## 1.2.1 (2025-05-15) | ||
| ### Bug fixes | ||
| Fix parsing of `*` selectors in descendant positions. | ||
| ## 1.2.0 (2025-05-12) | ||
@@ -2,0 +8,0 @@ |
+2
-2
@@ -22,3 +22,3 @@ 'use strict'; | ||
| const colon = 58, parenL = 40, underscore = 95, bracketL = 91, dash = 45, period = 46, | ||
| hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10; | ||
| hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10, asterisk = 42; | ||
@@ -55,3 +55,3 @@ function isAlpha(ch) { return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch >= 161 } | ||
| if (isAlpha(next) || next == underscore || next == hash || next == period || | ||
| next == bracketL || next == colon && isAlpha(input.peek(1)) || | ||
| next == asterisk || next == bracketL || next == colon && isAlpha(input.peek(1)) || | ||
| next == dash || next == ampersand) | ||
@@ -58,0 +58,0 @@ input.acceptToken(descendantOp); |
+2
-2
@@ -18,3 +18,3 @@ import { ExternalTokenizer, LRParser, LocalTokenGroup } from '@lezer/lr'; | ||
| const colon = 58, parenL = 40, underscore = 95, bracketL = 91, dash = 45, period = 46, | ||
| hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10; | ||
| hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10, asterisk = 42; | ||
@@ -51,3 +51,3 @@ function isAlpha(ch) { return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch >= 161 } | ||
| if (isAlpha(next) || next == underscore || next == hash || next == period || | ||
| next == bracketL || next == colon && isAlpha(input.peek(1)) || | ||
| next == asterisk || next == bracketL || next == colon && isAlpha(input.peek(1)) || | ||
| next == dash || next == ampersand) | ||
@@ -54,0 +54,0 @@ input.acceptToken(descendantOp); |
+1
-1
| { | ||
| "name": "@lezer/css", | ||
| "version": "1.2.0", | ||
| "version": "1.2.1", | ||
| "description": "lezer-based CSS grammar", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs", |
+2
-2
@@ -10,3 +10,3 @@ /* Hand-written tokenizers for CSS tokens that can't be | ||
| const colon = 58, parenL = 40, underscore = 95, bracketL = 91, dash = 45, period = 46, | ||
| hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10 | ||
| hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10, asterisk = 42 | ||
@@ -43,3 +43,3 @@ function isAlpha(ch) { return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch >= 161 } | ||
| if (isAlpha(next) || next == underscore || next == hash || next == period || | ||
| next == bracketL || next == colon && isAlpha(input.peek(1)) || | ||
| next == asterisk || next == bracketL || next == colon && isAlpha(input.peek(1)) || | ||
| next == dash || next == ampersand) | ||
@@ -46,0 +46,0 @@ input.acceptToken(descendantOp) |
| # Universal selectors | ||
| * {} | ||
| div * {} | ||
| ==> | ||
| StyleSheet(RuleSet(UniversalSelector,Block)) | ||
| StyleSheet( | ||
| RuleSet(UniversalSelector,Block), | ||
| RuleSet(DescendantSelector(TagSelector(TagName),UniversalSelector),Block)) | ||
@@ -9,0 +12,0 @@ # Type selectors |
73761
0.39%