Skip to content

Commit f115240

Browse files
committed
Properly discard the current rule/decl when you encounter a parse error.
--HG-- extra : rebase_source : 4e36fd0eddce4d2b673d1a63930e3e09e0c924f8
1 parent 1aace69 commit f115240

2 files changed

Lines changed: 15 additions & 9 deletions

File tree

css3-syntax/Overview.html

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,7 +2234,8 @@ <h4 id=at-rule-mode><span class=secno>3.6.3. </span> <dfn
22342234
<a href="#declaration-filled"><i>declaration-filled</i></a>, switch to
22352235
the <a href="#declaration-mode0"><i>declaration mode</i></a>.
22362236

2237-
<p> Otherwise, this is a <i>parse error</i>. Switch to the <a
2237+
<p> Otherwise, this is a <i>parse error</i>. Discard the <a
2238+
href="#current-rule"><i>current rule</i></a>. Switch to the <a
22382239
href="#next-block-error-mode0"><i>next-block error mode</i></a>.
22392240
Reconsume the <a href="#current-input-token"><i>current input
22402241
token</i></a>.
@@ -2342,8 +2343,9 @@ <h4 id=declaration-mode><span class=secno>3.6.6. </span> <dfn
23422343

23432344
<dt>anything else
23442345

2345-
<dd> This is a <i>parse error</i>. Switch to the <a
2346-
href="#next-declaration-error-mode0"><i>next-declaration error
2346+
<dd> This is a <i>parse error</i>. Discard the <a
2347+
href="#current-declaration"><i>current declaration</i></a>. Switch to the
2348+
<a href="#next-declaration-error-mode0"><i>next-declaration error
23472349
mode</i></a>.
23482350
</dl>
23492351

@@ -2377,8 +2379,9 @@ <h4 id=after-declaration-name-mode><span class=secno>3.6.7. </span> <dfn
23772379

23782380
<dt>anything else
23792381

2380-
<dd> This is a <i>parse error</i>. Switch to the <a
2381-
href="#next-declaration-error-mode0"><i>next-declaration error
2382+
<dd> This is a <i>parse error</i>. Discard the <a
2383+
href="#current-declaration"><i>current declaration</i></a>. Switch to the
2384+
<a href="#next-declaration-error-mode0"><i>next-declaration error
23822385
mode</i></a>.
23832386
</dl>
23842387

@@ -2470,8 +2473,8 @@ <h4 id=declaration-end-mode><span class=secno>3.6.9. </span> <dfn
24702473
<dt>anything else
24712474

24722475
<dd> This is a <i>parse error</i>. Discard the <a
2473-
href="#current-declaration"><i>current declaration</i></a> and switch to
2474-
the <a href="#next-declaration-error-mode0"><i>next-declaration error
2476+
href="#current-declaration"><i>current declaration</i></a>. Switch to the
2477+
<a href="#next-declaration-error-mode0"><i>next-declaration error
24752478
mode</i></a>.
24762479
</dl>
24772480

css3-syntax/Overview.src.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2252,6 +2252,7 @@ <h4>
22522252

22532253
<p>
22542254
Otherwise, this is a <i>parse error</i>.
2255+
Discard the <i>current rule</i>.
22552256
Switch to the <i>next-block error mode</i>.
22562257
Reconsume the <i>current input token</i>.
22572258

@@ -2363,6 +2364,7 @@ <h4>
23632364
<dt>anything else
23642365
<dd>
23652366
This is a <i>parse error</i>.
2367+
Discard the <i>current declaration</i>.
23662368
Switch to the <i>next-declaration error mode</i>.
23672369
</dl>
23682370

@@ -2398,6 +2400,7 @@ <h4>
23982400
<dt>anything else
23992401
<dd>
24002402
This is a <i>parse error</i>.
2403+
Discard the <i>current declaration</i>.
24012404
Switch to the <i>next-declaration error mode</i>.
24022405
</dl>
24032406

@@ -2491,8 +2494,8 @@ <h4>
24912494
<dt>anything else
24922495
<dd>
24932496
This is a <i>parse error</i>.
2494-
Discard the <i>current declaration</i>
2495-
and switch to the <i>next-declaration error mode</i>.
2497+
Discard the <i>current declaration</i>.
2498+
Switch to the <i>next-declaration error mode</i>.
24962499
</dl>
24972500

24982501

0 commit comments

Comments
 (0)