Skip to content

Commit 0b6cc29

Browse files
committed
Typo fix servo#1. Thanks @jdm.
1 parent 7c58a70 commit 0b6cc29

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

ast.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ pub enum ComponentValue {
5151

5252
// Simple block
5353
ParenthesisBlock(~[(ComponentValue, SourceLocation)]), // (…)
54-
SquareBraketBlock(~[(ComponentValue, SourceLocation)]), // […]
55-
CurlyBraketBlock(~[(ComponentValue, SourceLocation)]), // {…}
54+
SquareBracketBlock(~[(ComponentValue, SourceLocation)]), // […]
55+
CurlyBracketBlock(~[(ComponentValue, SourceLocation)]), // {…}
5656

5757
// These are always invalid
5858
BadURL,
5959
BadString,
6060
CloseParenthesis, // )
61-
CloseSquareBraket, // ]
62-
CloseCurlyBraket, // }
61+
CloseSquareBracket, // ]
62+
CloseCurlyBracket, // }
6363
}
6464

6565

parser.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ fn parse_at_rule(iter: &mut ComponentValueIterator, name: ~str, location: Source
172172
let mut block = None;
173173
for_iter!(iter, (component_value, location), {
174174
match component_value {
175-
CurlyBraketBlock(content) => { block = Some(content); break },
175+
CurlyBracketBlock(content) => { block = Some(content); break },
176176
Semicolon => break,
177177
component_value => prelude.push((component_value, location)),
178178
}
@@ -184,14 +184,14 @@ fn parse_at_rule(iter: &mut ComponentValueIterator, name: ~str, location: Source
184184
fn parse_qualified_rule(iter: &mut ComponentValueIterator, first: (ComponentValue, SourceLocation))
185185
-> Result<QualifiedRule, ErrorReason> {
186186
match first {
187-
(CurlyBraketBlock(content), location)
187+
(CurlyBracketBlock(content), location)
188188
=> return Ok(QualifiedRule { location: location, prelude: ~[], block: content }),
189189
_ => (),
190190
}
191191
let mut prelude = ~[first];
192192
for_iter!(iter, (component_value, location), {
193193
match component_value {
194-
CurlyBraketBlock(content)
194+
CurlyBracketBlock(content)
195195
=> return Ok(QualifiedRule {location: location, prelude: prelude, block: content}),
196196
component_value => prelude.push((component_value, location)),
197197
}

tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,16 +326,16 @@ impl ToJson for ComponentValue {
326326
=> JList(~[JString(~"function"), name.to_json()] + list_to_json(arguments)),
327327
ParenthesisBlock(ref content)
328328
=> JList(~[JString(~"()")] + list_to_json(content)),
329-
SquareBraketBlock(ref content)
329+
SquareBracketBlock(ref content)
330330
=> JList(~[JString(~"[]")] + list_to_json(content)),
331-
CurlyBraketBlock(ref content)
331+
CurlyBracketBlock(ref content)
332332
=> JList(~[JString(~"{}")] + list_to_json(content)),
333333
334334
BadURL => JList(~[JString(~"error"), JString(~"bad-url")]),
335335
BadString => JList(~[JString(~"error"), JString(~"bad-string")]),
336336
CloseParenthesis => JList(~[JString(~"error"), JString(~")")]),
337-
CloseSquareBraket => JList(~[JString(~"error"), JString(~"]")]),
338-
CloseCurlyBraket => JList(~[JString(~"error"), JString(~"}")]),
337+
CloseSquareBracket => JList(~[JString(~"error"), JString(~"]")]),
338+
CloseCurlyBracket => JList(~[JString(~"error"), JString(~"}")]),
339339
}
340340
}
341341
}

tokenizer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,23 +160,23 @@ pub fn next_component_value(parser: &mut Parser) -> Option<(ComponentValue, Sour
160160
else { consume_ident_like(parser) }
161161
},
162162
'a'..'z' | 'A'..'Z' | '_' => consume_ident_like(parser),
163-
'[' => SquareBraketBlock(consume_block(parser, CloseSquareBraket)),
163+
'[' => SquareBracketBlock(consume_block(parser, CloseSquareBraket)),
164164
'\\' => {
165165
if !parser.starts_with("\\\n") { consume_ident_like(parser) }
166166
else { parser.position += 1; Delim(c) }
167167
},
168-
']' => { parser.position += 1; CloseSquareBraket },
168+
']' => { parser.position += 1; CloseSquareBracket },
169169
'^' => {
170170
if parser.starts_with("^=") { parser.position += 2; PrefixMatch }
171171
else { parser.position += 1; Delim(c) }
172172
},
173-
'{' => CurlyBraketBlock(consume_block(parser, CloseCurlyBraket)),
173+
'{' => CurlyBracketBlock(consume_block(parser, CloseCurlyBraket)),
174174
'|' => {
175175
if parser.starts_with("|=") { parser.position += 2; DashMatch }
176176
else if parser.starts_with("||") { parser.position += 2; Column }
177177
else { parser.position += 1; Delim(c) }
178178
},
179-
'}' => { parser.position += 1; CloseCurlyBraket },
179+
'}' => { parser.position += 1; CloseCurlyBracket },
180180
'~' => {
181181
if parser.starts_with("~=") { parser.position += 2; IncludeMath }
182182
else { parser.position += 1; Delim(c) }

0 commit comments

Comments
 (0)