Skip to content

Commit a0ec26c

Browse files
committed
[csss-shadow-parts-1] Updates from tabatkins' review
- Use [=...=] and <dfn> - Don't skip leading colons. - Use / to denote pairs. - error on trialing junk in mapping - DOMToken -> token - link pair and list
1 parent 41e3307 commit a0ec26c

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

css-shadow-parts-1/Overview.bs

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -324,36 +324,37 @@ Microsyntaxes for parsing {#parsing}
324324
Rules for parsing part mappings {#parsing-mapping}
325325
----------------------------------------------
326326

327-
A <span>valid part mapping</span> is a pair of DOMTokens
327+
A <dfn export>valid part mapping</dfn> is a [=pair=] of tokens
328328
separated by a U+003A COLON charater,
329329
with no other characters (e.g. no space characters).
330-
The DOMTokens must not contain U+003A COLON or U+002C COMMA characters.
330+
The tokens must not contain U+003A COLON or U+002C COMMA characters.
331331

332332
The rules for parsing a part mapping are as follows:
333333

334334
1. Let <var>input</var> be the string being parsed.
335335

336336
1. Let <var>position</var> be a pointer into <var>input</var>, initially pointing at the start of the string.
337337

338-
1. <span>Collect a sequence of code points</span> that are space characters or U+003A COLON characters.
339-
This skips past any leading delimiters.
340-
1. <span>Collect a sequence of code points</span> that are not space characters or U+003A COLON characters,
338+
1. [=Collect a sequence of code points=] that are space characters
339+
1. [=Collect a sequence of code points=] that are not space characters or U+003A COLON characters,
341340
and let <var>first token</var> be the result.
342341
1. If <var>first token</var> is empty then return error.
343-
1. <span>Collect a sequence of code points</span> that are space characters.
344-
1. If the end of the <var>input</var> has been reached, return the pair <var>first token</var>, <var>first token</var>
342+
1. [=Collect a sequence of code points=] that are space characters.
343+
1. If the end of the <var>input</var> has been reached, return the [=pair=] <var>first token</var>/<var>first token</var>
345344
1. If character at <var>position</var> is not a U+003A COLON character, return error.
346345
1. Consume the U+003A COLON character.
347-
1. <span>Collect a sequence of code points</span> that are space characters.
348-
1. <span>Collect a sequence of code points</span> that are not space characters or U+003A COLON characters.
346+
1. [=Collect a sequence of code points=] that are space characters.
347+
1. [=Collect a sequence of code points=] that are not space characters or U+003A COLON characters.
349348
and let <var>second token</var> be the result.
350349
1. If <var>second token</var> is empty then return error.
351-
1. Return the pair <var>first token</var>, <var>second token</var>.
350+
1. [=Collect a sequence of code points=] that are space characters.
351+
1. If <var>position</var> is past the end of <var>input</var> then return error.
352+
1. Return the [=pair=] <var>first token</var>/<var>second token</var>.
352353

353354
Rules for parsing a list of part mappings {#parsing-mapping-list}
354355
----------------------------------------------
355356

356-
A <span>valid list of part mappings</span> is a number of valid part mappings
357+
A <dfn export>valid list of part mappings</dfn> is a number of valid part mappings
357358
separated by a U+002C COMMA charater,
358359
with no other characters (e.g. no space characters).
359360

@@ -363,15 +364,15 @@ The rules for parsing a list of part mappings are as follow:
363364

364365
1. Let <var>position</var> be a pointer into <var>input</var>, initially pointing at the start of the string.
365366

366-
1. Let <var>mappings</var> be an initially empty list of pairs of DOMTokens.
367-
This list will be the result of this algorithm.
367+
1. Let <var>mappings</var> be an initially empty [=list=] of [=pairs=] of tokens.
368+
This [=list=] will be the result of this algorithm.
368369

369-
1. <span>Collect a sequence of code points</span> that are space characters, U+002C COMMA or U+003A COLON characters.
370+
1. [=Collect a sequence of code points=] that are space characters, U+002C COMMA.
370371
This skips past any leading delimiters.
371372

372373
1. While <var>position</var> is not past the end of <var>input</var>:
373374

374-
1. <span>Collect a sequence of code points</span> that are not U+002C COMMA characters,
375+
1. [=Collect a sequence of code points=] that are not U+002C COMMA characters,
375376
and let <var>unparsed mapping</var> be the result.
376377
1. Let <var>mapping</var> be the result of parsing <var>unparsed mapping</var> using the <span>rules for parsing part mappings</span>.
377378
1. If <var>mapping</var> is an error, continue.

0 commit comments

Comments
 (0)