@@ -2549,12 +2549,13 @@ Consume a qualified rule</h4>
2549
2549
2550
2550
Create a new qualified rule
2551
2551
with its prelude initially set to an empty [=list=] ,
2552
- and its value initially set to nothing.
2552
+ and its block initially set to nothing.
2553
2553
2554
2554
Repeatedly consume the <a>next input token</a> :
2555
2555
2556
2556
<dl>
2557
2557
<dt> <<EOF-token>>
2558
+ <dt> <<semicolon-token>>
2558
2559
<dd>
2559
2560
This is a <a>parse error</a> .
2560
2561
Return nothing.
@@ -2605,28 +2606,23 @@ Consume a style block's contents</h4>
2605
2606
and append the result to |rules|.
2606
2607
2607
2608
<dt> <<ident-token>>
2609
+ <dt> <<function-token>>
2610
+ <dt> <<function>>
2608
2611
<dd>
2609
- Initialize a temporary list initially filled with the <a>current input token</a> .
2612
+ <a>Reconsume the current input token</a> .
2613
+ Initialize a temporary list, initially empty.
2610
2614
As long as the <a>next input token</a> is anything other than a <<semicolon-token>> or <<EOF-token>> ,
2611
2615
<a>consume a component value</a> and append it to the temporary list.
2612
2616
<a>Consume a declaration</a> from the temporary list.
2613
2617
If anything was returned,
2614
2618
append it to |decls|.
2615
2619
2616
- <dt> <<delim-token>> with a value of "&" (U+0026 AMPERSAND)
2620
+ <dt> anything else </dd>
2617
2621
<dd>
2618
2622
[=Reconsume the current input token=] .
2619
2623
[=Consume a qualified rule=] .
2620
2624
If anything was returned,
2621
2625
append it to |rules|.
2622
-
2623
- <dt> anything else</dd>
2624
- <dd>
2625
- This is a <a>parse error</a> .
2626
- <a>Reconsume the current input token</a> .
2627
- As long as the <a>next input token</a> is anything other than a <<semicolon-token>> or <<EOF-token>> ,
2628
- <a>consume a component value</a>
2629
- and throw away the returned value.
2630
2626
</dl>
2631
2627
2632
2628
@@ -2677,16 +2673,33 @@ Consume a list of declarations</h4>
2677
2673
<h4 id="consume-declaration">
2678
2674
Consume a declaration</h4>
2679
2675
2680
- Note: This algorithm assumes that the <a>next input token</a> has already been checked to be an <<ident-token>> .
2681
-
2682
2676
To <dfn>consume a declaration</dfn> :
2683
2677
2684
- <a>Consume the next input token</a> .
2685
- Create a new declaration
2686
- with its name set to the value of the <a>current input token</a>
2687
- and its value initially set to an empty [=list=] .
2688
-
2678
+ Let |decl| be a new declaration,
2679
+ with an initially empty name
2680
+ and a value set to an empty [=list=] .
2689
2681
<ol>
2682
+ <li>
2683
+ <a>Consume a component value</a> .
2684
+
2685
+ <dl class=switch>
2686
+ : <<ident-token>>
2687
+ ::
2688
+ Set |decl|'s name to the value of the <<ident-token>> .
2689
+
2690
+ : anything else
2691
+ ::
2692
+ This is a [=parse error=] .
2693
+
2694
+ While the [=next input token=]
2695
+ is anything but a <<semicolon-token>>
2696
+ or <<eof-token>> ,
2697
+ [=consume a component value=]
2698
+ and throw it away.
2699
+
2700
+ Return nothing.
2701
+ </dl>
2702
+
2690
2703
<li>
2691
2704
While the <a>next input token</a> is a <<whitespace-token>> ,
2692
2705
<a>consume the next input token</a> .
@@ -2705,21 +2718,21 @@ Consume a declaration</h4>
2705
2718
<li>
2706
2719
As long as the <a>next input token</a> is anything other than an <<EOF-token>> ,
2707
2720
<a>consume a component value</a>
2708
- and append it to the declaration 's value.
2721
+ and append it to |decl| 's value.
2709
2722
2710
2723
<li>
2711
2724
If the last two non-<<whitespace-token>> s in the declaration's value are
2712
2725
a <<delim-token>> with the value "!"
2713
2726
followed by an <<ident-token>> with a value that is an <a>ASCII case-insensitive</a> match for "important",
2714
- remove them from the declaration 's value
2715
- and set the declaration 's <var> important</var> flag to true.
2727
+ remove them from |decl| 's value
2728
+ and set |decl| 's <var> important</var> flag to true.
2716
2729
2717
2730
<li>
2718
- While the last token in the declaration 's value is a <<whitespace-token>> ,
2731
+ While the last token in |decl| 's value is a <<whitespace-token>> ,
2719
2732
[=list/remove=] that token.
2720
2733
2721
2734
<li>
2722
- Return the declaration .
2735
+ Return |decl| .
2723
2736
</ol>
2724
2737
2725
2738
0 commit comments