Skip to content

Commit e4d08f2

Browse files
committed
[css3-syntax] Make sure all the error mode entry points reconsume the current input token.
1 parent 1668d91 commit e4d08f2

2 files changed

Lines changed: 42 additions & 13 deletions

File tree

css3-syntax/Overview.html

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2945,7 +2945,9 @@ <h4 id=at-rule-prelude-mode><span class=secno>5.3.2. </span> <dfn
29452945
error</i>. <a href="#discard-the-current-rule0"><i>Discard the current
29462946
rule</i></a>. Switch to the <a
29472947
href="#next-block-or-statement-error-mode0"><i>next-block-or-statement
2948-
error mode</i></a>.
2948+
error mode</i></a>. <a
2949+
href="#reconsume-the-current-input-token"><i>Reconsume the current input
2950+
token</i></a>.
29492951
<p> Otherwise, if the <a href="#current-rule"><i>current rule</i></a> is
29502952
<a href="#declaration-filled"><i>declaration-filled</i></a> or <a
29512953
href="#rule-filled"><i>rule-filled</i></a>, this is a <i>parse
@@ -2986,7 +2988,9 @@ <h4 id=at-rule-prelude-mode><span class=secno>5.3.2. </span> <dfn
29862988
href="#next-block-error-mode0"><i>next-block error mode</i></a>;
29872989
otherwise, switch to the <a
29882990
href="#next-block-or-statement-error-mode0"><i>next-block-or-statement
2989-
error mode</i></a>.
2991+
error mode</i></a>. <a
2992+
href="#reconsume-the-current-input-token"><i>Reconsume the current input
2993+
token</i></a>.
29902994
</dl>
29912995

29922996
<h4 id=rule-block-mode><span class=secno>5.3.3. </span> <dfn
@@ -3043,7 +3047,9 @@ <h4 id=selector-mode><span class=secno>5.3.4. </span> <dfn
30433047
href="#top-level-rule"><i>top-level rule</i></a>, this is a <i>parse
30443048
error</i>. <a href="#discard-the-current-rule0"><i>Discard the current
30453049
rule</i></a>. Switch to the <a
3046-
href="#next-block-error-mode0"><i>next-block error mode</i></a>.
3050+
href="#next-block-error-mode0"><i>next-block error mode</i></a>. <a
3051+
href="#reconsume-the-current-input-token"><i>Reconsume the current input
3052+
token</i></a>.
30473053
<p> Otherwise, this is a <i>parse error</i>. <a
30483054
href="#discard-the-current-rule0"><i>Discard the current rule</i></a>.
30493055
<a href="#switch-to-the-current-rules-content-mode0"><i>Switch to the
@@ -3066,7 +3072,8 @@ <h4 id=selector-mode><span class=secno>5.3.4. </span> <dfn
30663072
<p> Otherwise, this is a <i>parse error</i>. <a
30673073
href="#discard-the-current-rule0"><i>Discard the current rule</i></a>.
30683074
Switch to the <a href="#next-block-error-mode0"><i>next-block error
3069-
mode</i></a>.
3075+
mode</i></a>. <a href="#reconsume-the-current-input-token"><i>Reconsume
3076+
the current input token</i></a>.
30703077
</dl>
30713078

30723079
<h4 id=declaration-block-mode><span class=secno>5.3.5. </span> <dfn
@@ -3089,7 +3096,8 @@ <h4 id=declaration-block-mode><span class=secno>5.3.5. </span> <dfn
30893096
error</i>. Unset the <a href="#current-declaration"><i>current
30903097
declaration</i></a>. Switch to the <a
30913098
href="#next-declaration-error-mode0"><i>next-declaration error
3092-
mode</i></a>.
3099+
mode</i></a>. <a href="#reconsume-the-current-input-token"><i>Reconsume
3100+
the current input token</i></a>.
30933101
<p> Otherwise, <a href="#pop-the-current-rule0"><i>pop the current
30943102
rule</i></a>. <a
30953103
href="#switch-to-the-current-rules-content-mode0"><i>Switch to the
@@ -3120,7 +3128,8 @@ <h4 id=declaration-block-mode><span class=secno>5.3.5. </span> <dfn
31203128
<dd> This is a <i>parse error</i>. Unset the <a
31213129
href="#current-declaration"><i>current declaration</i></a>. Switch to the
31223130
<a href="#next-declaration-error-mode0"><i>next-declaration error
3123-
mode</i></a>.
3131+
mode</i></a>. <a href="#reconsume-the-current-input-token"><i>Reconsume
3132+
the current input token</i></a>.
31243133
</dl>
31253134

31263135
<h4 id=after-declaration-name-mode><span class=secno>5.3.6. </span> <dfn
@@ -3156,7 +3165,8 @@ <h4 id=after-declaration-name-mode><span class=secno>5.3.6. </span> <dfn
31563165
<dd> This is a <i>parse error</i>. Unset the <a
31573166
href="#current-declaration"><i>current declaration</i></a>. Switch to the
31583167
<a href="#next-declaration-error-mode0"><i>next-declaration error
3159-
mode</i></a>.
3168+
mode</i></a>. <a href="#reconsume-the-current-input-token"><i>Reconsume
3169+
the current input token</i></a>.
31603170
</dl>
31613171

31623172
<h4 id=declaration-value-mode><span class=secno>5.3.7. </span> <dfn
@@ -3188,7 +3198,8 @@ <h4 id=declaration-value-mode><span class=secno>5.3.7. </span> <dfn
31883198
error</i>. Unset the <a href="#current-declaration"><i>current
31893199
declaration</i></a>. Switch to the <a
31903200
href="#next-declaration-error-mode0"><i>next-declaration error
3191-
mode</i></a>.
3201+
mode</i></a>. <a href="#reconsume-the-current-input-token"><i>Reconsume
3202+
the current input token</i></a>.
31923203
<p> Otherwise, if the <a href="#current-declaration"><i>current
31933204
declaration</i></a> is grammatically valid, append it to the value of
31943205
the <a href="#current-rule"><i>current rule</i></a>. Unset the <a
@@ -3215,7 +3226,8 @@ <h4 id=declaration-value-mode><span class=secno>5.3.7. </span> <dfn
32153226
this mode; otherwise, unset the <a href="#current-declaration"><i>current
32163227
declaration</i></a> and switch to the <a
32173228
href="#next-declaration-error-mode0"><i>next-declaration error
3218-
mode</i></a>.
3229+
mode</i></a>. <a href="#reconsume-the-current-input-token"><i>Reconsume
3230+
the current input token</i></a>.
32193231
<p> Otherwise, if the <a href="#quirks-mode"><i>quirks mode</i></a> flag
32203232
is set, and the <a href="#current-declaration"><i>current
32213233
declaration's</i></a> name is an <a
@@ -3230,15 +3242,17 @@ <h4 id=declaration-value-mode><span class=secno>5.3.7. </span> <dfn
32303242
this mode; otherwise, unset the <a
32313243
href="#current-declaration"><i>current declaration</i></a> and switch to
32323244
the <a href="#next-declaration-error-mode0"><i>next-declaration error
3233-
mode</i></a>.
3245+
mode</i></a>. <a href="#reconsume-the-current-input-token"><i>Reconsume
3246+
the current input token</i></a>.
32343247

32353248
<p> Otherwise, <a href="#consume-a-component-value0"><i>consume a
32363249
component value</i></a>. If anything was returned, append the returned
32373250
value to the value of the <a href="#current-declaration"><i>current
32383251
declaration</i></a> and remain in this mode; otherwise, unset the <a
32393252
href="#current-declaration"><i>current declaration</i></a> and switch to
32403253
the <a href="#next-declaration-error-mode0"><i>next-declaration error
3241-
mode</i></a>.
3254+
mode</i></a>. <a href="#reconsume-the-current-input-token"><i>Reconsume
3255+
the current input token</i></a>.
32423256
</dl>
32433257

32443258
<h4 id=declaration-important-mode><span class=secno>5.3.8. </span> <dfn
@@ -3301,7 +3315,8 @@ <h4 id=declaration-end-mode><span class=secno>5.3.9. </span> <dfn
33013315
error</i>. Unset the <a href="#current-declaration"><i>current
33023316
declaration</i></a>. Switch to the <a
33033317
href="#next-declaration-error-mode0"><i>next-declaration error
3304-
mode</i></a>.
3318+
mode</i></a>. <a href="#reconsume-the-current-input-token"><i>Reconsume
3319+
the current input token</i></a>.
33053320
<p> Otherwise, if the <a href="#current-declaration"><i>current
33063321
declaration</i></a> is grammatically valid, append it to the value of
33073322
the <a href="#current-rule"><i>current rule</i></a>. Unset the <a
@@ -3319,7 +3334,8 @@ <h4 id=declaration-end-mode><span class=secno>5.3.9. </span> <dfn
33193334
<dd> This is a <i>parse error</i>. Unset the <a
33203335
href="#current-declaration"><i>current declaration</i></a>. Switch to the
33213336
<a href="#next-declaration-error-mode0"><i>next-declaration error
3322-
mode</i></a>.
3337+
mode</i></a>. <a href="#reconsume-the-current-input-token"><i>Reconsume
3338+
the current input token</i></a>.
33233339
</dl>
33243340

33253341
<h4 id=next-block-error-mode><span class=secno>5.3.10. </span> <dfn

css3-syntax/Overview.src.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2426,6 +2426,7 @@ <h4>
24262426
this is a <i>parse error</i>.
24272427
<i>Discard the current rule</i>.
24282428
Switch to the <i>next-block-or-statement error mode</i>.
2429+
<i>Reconsume the current input token</i>.
24292430

24302431
<p>
24312432
Otherwise,
@@ -2468,6 +2469,7 @@ <h4>
24682469
switch to the <i>next-block error mode</i>;
24692470
otherwise,
24702471
switch to the <i>next-block-or-statement error mode</i>.
2472+
<i>Reconsume the current input token</i>.
24712473
</dl>
24722474

24732475

@@ -2525,6 +2527,7 @@ <h4>
25252527
this is a <i>parse error</i>.
25262528
<i>Discard the current rule</i>.
25272529
Switch to the <i>next-block error mode</i>.
2530+
<i>Reconsume the current input token</i>.
25282531

25292532
<p>
25302533
Otherwise,
@@ -2552,6 +2555,7 @@ <h4>
25522555
this is a <i>parse error</i>.
25532556
<i>Discard the current rule</i>.
25542557
Switch to the <i>next-block error mode</i>.
2558+
<i>Reconsume the current input token</i>.
25552559
</dl>
25562560

25572561

@@ -2575,6 +2579,7 @@ <h4>
25752579
this is a <i>parse error</i>.
25762580
Unset the <i>current declaration</i>.
25772581
Switch to the <i>next-declaration error mode</i>.
2582+
<i>Reconsume the current input token</i>.
25782583

25792584
<p>
25802585
Otherwise,
@@ -2604,6 +2609,7 @@ <h4>
26042609
This is a <i>parse error</i>.
26052610
Unset the <i>current declaration</i>.
26062611
Switch to the <i>next-declaration error mode</i>.
2612+
<i>Reconsume the current input token</i>.
26072613
</dl>
26082614

26092615

@@ -2640,6 +2646,7 @@ <h4>
26402646
This is a <i>parse error</i>.
26412647
Unset the <i>current declaration</i>.
26422648
Switch to the <i>next-declaration error mode</i>.
2649+
<i>Reconsume the current input token</i>.
26432650
</dl>
26442651

26452652

@@ -2668,6 +2675,7 @@ <h4>
26682675
this is a <i>parse error</i>.
26692676
Unset the <i>current declaration</i>.
26702677
Switch to the <i>next-declaration error mode</i>.
2678+
<i>Reconsume the current input token</i>.
26712679

26722680
<p>
26732681
Otherwise,
@@ -2695,6 +2703,7 @@ <h4>
26952703
otherwise,
26962704
unset the <i>current declaration</i>
26972705
and switch to the <i>next-declaration error mode</i>.
2706+
<i>Reconsume the current input token</i>.
26982707

26992708

27002709
<p>
@@ -2711,6 +2720,7 @@ <h4>
27112720
otherwise,
27122721
unset the <i>current declaration</i>
27132722
and switch to the <i>next-declaration error mode</i>.
2723+
<i>Reconsume the current input token</i>.
27142724

27152725
<p>
27162726
Otherwise,
@@ -2722,6 +2732,7 @@ <h4>
27222732
otherwise,
27232733
unset the <i>current declaration</i>
27242734
and switch to the <i>next-declaration error mode</i>.
2735+
<i>Reconsume the current input token</i>.
27252736
</dl>
27262737

27272738

@@ -2784,6 +2795,7 @@ <h4>
27842795
this is a <i>parse error</i>.
27852796
Unset the <i>current declaration</i>.
27862797
Switch to the <i>next-declaration error mode</i>.
2798+
<i>Reconsume the current input token</i>.
27872799

27882800
<p>
27892801
Otherwise,
@@ -2802,6 +2814,7 @@ <h4>
28022814
This is a <i>parse error</i>.
28032815
Unset the <i>current declaration</i>.
28042816
Switch to the <i>next-declaration error mode</i>.
2817+
<i>Reconsume the current input token</i>.
28052818
</dl>
28062819

28072820

0 commit comments

Comments
 (0)