aboutsummaryrefslogtreecommitdiffstats
path: root/src/servo/parser/lexer_util.rs
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2012-08-05 14:42:50 +0200
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2012-08-05 14:42:50 +0200
commitcb855210979971f6f22a0ae187ea0b54d783a08c (patch)
treef78be5373b27676db425940a93edd7a1efe05f37 /src/servo/parser/lexer_util.rs
parent1a713b81bbc370b0d81701e4641063c486cfb7fb (diff)
downloadservo-cb855210979971f6f22a0ae187ea0b54d783a08c.tar.gz
servo-cb855210979971f6f22a0ae187ea0b54d783a08c.zip
Adapt to rust changes
Diffstat (limited to 'src/servo/parser/lexer_util.rs')
-rw-r--r--src/servo/parser/lexer_util.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/servo/parser/lexer_util.rs b/src/servo/parser/lexer_util.rs
index dcd0f0140ea..1f63e246f5d 100644
--- a/src/servo/parser/lexer_util.rs
+++ b/src/servo/parser/lexer_util.rs
@@ -25,12 +25,12 @@ trait u8_methods {
impl u8_methods of u8_methods for u8 {
fn is_whitespace() -> bool {
- ret self == ' ' as u8 || self == '\n' as u8 || self == '\t' as u8;
+ return self == ' ' as u8 || self == '\n' as u8 || self == '\t' as u8;
}
fn is_alpha() -> bool {
- ret (self >= ('A' as u8) && self <= ('Z' as u8)) ||
- (self >= ('a' as u8) && self <= ('z' as u8));
+ return (self >= ('A' as u8) && self <= ('Z' as u8)) ||
+ (self >= ('a' as u8) && self <= ('z' as u8));
}
}
@@ -50,7 +50,7 @@ impl util_methods of util_methods for InputState {
some(coe) {
let rv = coe;
self.lookahead = none;
- ret rv;
+ return rv;
}
none {
/* fall through */
@@ -60,21 +60,21 @@ impl util_methods of util_methods for InputState {
// FIXME: Lots of copies here
if self.buffer.len() > 0 {
- ret CoeChar(vec::shift(self.buffer));
+ return CoeChar(vec::shift(self.buffer));
}
if self.eof {
- ret CoeEof;
+ return CoeEof;
}
alt self.input_port.recv() {
Payload(data) {
self.buffer = data;
- ret CoeChar(vec::shift(self.buffer));
+ return CoeChar(vec::shift(self.buffer));
}
Done(*) {
self.eof = true;
- ret CoeEof;
+ return CoeEof;
}
}
}
@@ -112,7 +112,7 @@ impl util_methods of util_methods for InputState {
}
}
}
- ret str::from_bytes(result);
+ return str::from_bytes(result);
}
fn expect_ident(expected: ~str) {
@@ -128,11 +128,11 @@ impl util_methods of util_methods for InputState {
CoeChar(c) {
if !c.is_whitespace() {
self.unget(c);
- ret;
+ return;
}
}
CoeEof {
- ret;
+ return;
}
}
}