Skip to content

Commit b872f8e

Browse files
committed
[css-syntax] Allow leading whitespace in "Parse a declaration".
1 parent 67385f6 commit b872f8e

2 files changed

Lines changed: 19 additions & 13 deletions

File tree

css-syntax/Overview.html

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<meta content="CSS Syntax Module Level 3 (CSS3 Syntax)" name=dcterms.title>
1313
<meta content=text name=dcterms.type>
14-
<meta content=2013-06-24 name=dcterms.date>
14+
<meta content=2013-06-25 name=dcterms.date>
1515
<meta content="Tab Atkins Jr." name=dcterms.creator>
1616
<meta content="Simon Sapin" name=dcterms.creator>
1717
<meta content=W3C name=dcterms.publisher>
@@ -33,7 +33,7 @@
3333
<h1 class=p-name>CSS Syntax Module Level 3</h1>
3434

3535
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft <time
36-
class=dt-updated datetime=20130624>24 June 2013</time></h2>
36+
class=dt-updated datetime=20130625>25 June 2013</time></h2>
3737

3838
<dl>
3939
<dt>This version:
@@ -654,8 +654,8 @@ <h2 id=tokenization><span class=secno>4. </span> Tokenization</h2>
654654
<p> Implementations must act as if they used the following algorithms to
655655
tokenize CSS. To transform a stream of characters into a stream of tokens,
656656
repeatedly <a href="#consume-a-token0"><i>consume a token</i></a> until an
657-
〈EOF〉 is encountered, collecting the returned tokens into a stream.
658-
Each call to the <a href="#consume-a-token0"><i>consume a token</i></a>
657+
〈EOF〉 is reached, collecting the returned tokens into a stream. Each
658+
call to the <a href="#consume-a-token0"><i>consume a token</i></a>
659659
algorithm returns a single token, so it can also be used "on-demand" to
660660
tokenize a stream of characters <em>during</em> parsing, if so desired.
661661

@@ -3060,7 +3060,7 @@ <h4 id=parse-a-rule><span class=secno>5.3.3. </span> <dfn
30603060

30613061
<ol>
30623062
<li> Consume 〈whitespace〉s from the token stream until a
3063-
non-〈whitespace〉 is encountered.
3063+
non-〈whitespace〉 is reached.
30643064

30653065
<li> If the <a href="#current-input-token"><i>current input
30663066
token</i></a> is a 〈CDO〉, 〈CDC〉, or 〈EOF〉, return a
@@ -3074,7 +3074,7 @@ <h4 id=parse-a-rule><span class=secno>5.3.3. </span> <dfn
30743074
error.
30753075

30763076
<li> Consume 〈whitespace〉s from the token stream until a
3077-
non-〈whitespace〉 is encountered.
3077+
non-〈whitespace〉 is reached.
30783078

30793079
<li> If the <a href="#current-input-token"><i>current input
30803080
token</i></a> is an 〈EOF〉, return the rule obtained in step 2.
@@ -3087,6 +3087,9 @@ <h4 id=parse-a-declaration><span class=secno>5.3.4. </span> <dfn
30873087
<p> To <a href="#parse-a-declaration0"><i>parse a declaration</i></a>:
30883088

30893089
<ol>
3090+
<li> Consume 〈whitespace〉s from the token stream until a
3091+
non-〈whitespace〉 is reached.
3092+
30903093
<li> <a href="#consume-a-declaration0"><i>Consume a
30913094
declaration</i></a>. If anything was returned, return it. Otherwise,
30923095
return a syntax error.
@@ -3111,14 +3114,14 @@ <h4 id=parse-a-component-value><span class=secno>5.3.6. </span> <dfn
31113114
value</i></a>:
31123115

31133116
<ol>
3114-
<li> Discard 〈whitespace〉s from the token stream until a
3117+
<li> Consume 〈whitespace〉s from the token stream until a
31153118
non-〈whitespace〉 is reached. If the token stream is exhausted
31163119
without finding a non-〈whitespace〉, return a syntax error.
31173120

31183121
<li> <a href="#consume-a-component-value0"><i>Consume a component
31193122
value</i></a>. If nothing is returned, return a syntax error.
31203123

3121-
<li> Discard 〈whitespace〉s from the token stream until a
3124+
<li> Consume 〈whitespace〉s from the token stream until a
31223125
non-〈whitespace〉 is reached. If the token stream is exhausted
31233126
without finding a non-〈whitespace〉, return the value found in the
31243127
previous step. Otherwise, return a syntax error.

css-syntax/Overview.src.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ <h2>
422422
Implementations must act as if they used the following algorithms to tokenize CSS.
423423
To transform a stream of characters into a stream of tokens,
424424
repeatedly <i>consume a token</i>
425-
until an 〈EOF〉 is encountered,
425+
until an 〈EOF〉 is reached,
426426
collecting the returned tokens into a stream.
427427
Each call to the <i>consume a token</i> algorithm
428428
returns a single token,
@@ -2010,7 +2010,7 @@ <h4>
20102010

20112011
<ol>
20122012
<li>
2013-
Consume 〈whitespace〉s from the token stream until a non-〈whitespace〉 is encountered.
2013+
Consume 〈whitespace〉s from the token stream until a non-〈whitespace〉 is reached.
20142014

20152015
<li>
20162016
If the <i>current input token</i>
@@ -2029,7 +2029,7 @@ <h4>
20292029
return a syntax error.
20302030

20312031
<li>
2032-
Consume 〈whitespace〉s from the token stream until a non-〈whitespace〉 is encountered.
2032+
Consume 〈whitespace〉s from the token stream until a non-〈whitespace〉 is reached.
20332033

20342034
<li>
20352035
If the <i>current input token</i> is an 〈EOF〉,
@@ -2044,6 +2044,9 @@ <h4>
20442044
To <i>parse a declaration</i>:
20452045

20462046
<ol>
2047+
<li>
2048+
Consume 〈whitespace〉s from the token stream until a non-〈whitespace〉 is reached.
2049+
20472050
<li>
20482051
<i>Consume a declaration</i>.
20492052
If anything was returned, return it.
@@ -2069,7 +2072,7 @@ <h4>
20692072

20702073
<ol>
20712074
<li>
2072-
Discard 〈whitespace〉s from the token stream until a non-〈whitespace〉 is reached.
2075+
Consume 〈whitespace〉s from the token stream until a non-〈whitespace〉 is reached.
20732076
If the token stream is exhausted without finding a non-〈whitespace〉,
20742077
return a syntax error.
20752078

@@ -2079,7 +2082,7 @@ <h4>
20792082
return a syntax error.
20802083

20812084
<li>
2082-
Discard 〈whitespace〉s from the token stream until a non-〈whitespace〉 is reached.
2085+
Consume 〈whitespace〉s from the token stream until a non-〈whitespace〉 is reached.
20832086
If the token stream is exhausted without finding a non-〈whitespace〉,
20842087
return the value found in the previous step.
20852088
Otherwise,

0 commit comments

Comments
 (0)