Skip to content

Commit c3cdd33

Browse files
committed
Fix critical issue with parsing of the any-value production in the selectors module
This fixes _broken_ parsing of the production.
1 parent b930beb commit c3cdd33

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/csspring/selectors.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def parse_any_value(input: TokenStream) -> Product | None:
5050
result: list[Token] = []
5151
count = { type: 0 for type in { OpenBraceToken, OpenBracketToken, OpenParenToken } }
5252
while True:
53-
match token := input.consume_token():
53+
match token := input.next_token():
5454
case BadStringToken() | BadURLToken():
5555
break
5656
case OpenParenToken() | OpenBracketToken() | OpenBraceToken():
@@ -61,6 +61,7 @@ def parse_any_value(input: TokenStream) -> Product | None:
6161
count[token.mirror_type] -= 1
6262
case None:
6363
break
64+
input.consume_token()
6465
result.append(token)
6566
if result:
6667
return result

0 commit comments

Comments
 (0)