w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.52k stars 672 forks source link

[css-syntax] Do token streams vend component values? #10863

Open amn opened 2 months ago

amn commented 2 months ago

I am confused as to whether a token stream as defined at https://drafts.csswg.org/css-syntax/#parser-definitions, ever vends component values [evidently allowed in the stream], or only tokens?

The first parable states:

A token stream is a struct representing a stream of tokens and/or component values.

It's made clear with the above that there may be component values "represented" in the stream. Further down, the tokens item of the struct is said to be, quoting:

A list of tokens and/or component values.

Which only supports the argument that component values are in the struct.

However, it doesn't outright say what would say be the effect of the above, for example as the "next token" and "consume token" steps are invoked -- does the stream decompose contained component values into individual tokens before vending them, or outright vend said component values?

fantasai commented 1 month ago

Sorry, accidentally clicked the Close button. >_<;;