Skip to content

Commit c9a4964

Browse files
committed
Add a Comma token.
1 parent e7b8a9a commit c9a4964

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

ast.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ pub enum ComponentValue {
3636
WhiteSpace,
3737
Colon, // :
3838
Semicolon, // ;
39+
Comma, // ,
3940
IncludeMath, // ~=
4041
DashMatch, // |=
4142
PrefixMatch, // ^=

tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ impl ToJson for ComponentValue {
312312
WhiteSpace => JString(~" "),
313313
Colon => JString(~":"),
314314
Semicolon => JString(~";"),
315+
Comma => JString(~","),
315316
IncludeMath => JString(~"~="),
316317
DashMatch => JString(~"|="),
317318
PrefixMatch => JString(~"^="),

tokenizer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ pub fn next_component_value(parser: &mut Parser) -> Option<(ComponentValue, Sour
106106
Delim(c)
107107
}
108108
},
109+
',' => { parser.position += 1; Comma },
109110
'-' => {
110111
if (
111112
parser.position + 1 < parser.length

0 commit comments

Comments
 (0)