(input, pos, comment)
| 2147 | * @returns {Declaration | undefined} the parsed declaration, or undefined |
| 2148 | */ |
| 2149 | const parseADeclaration = (input, pos, comment) => { |
| 2150 | // 1. Normalize input, and set input to the result. |
| 2151 | const ts = normalizeIntoTokenStream(input, pos, comment); |
| 2152 | useObjectBackend(ts.locConverter); |
| 2153 | // 2. Discard whitespace from input. |
| 2154 | while (ts.next().type === TT_WHITESPACE) ts.discard(); |
| 2155 | // 3. Consume a declaration from input. If anything was returned, return it. Otherwise, return a syntax error. |
| 2156 | return consumeADeclaration(ts); |
| 2157 | }; |
| 2158 | |
| 2159 | /** |
| 2160 | * Parse a component value, CSS Syntax Level 3 [§5.3.9](https://drafts.csswg.org/css-syntax/#parse-component-value) — strict entry point that consumes one value and returns `undefined` if non-whitespace input trails (use `consumeAComponentValue` for "one value, ignore the rest"). |
no test coverage detected