core: Demode option

This commit is contained in:
Brian Anderson
2012-09-21 19:37:57 -07:00
parent 92752a462a
commit 4a78f9b166
81 changed files with 325 additions and 313 deletions

View File

@@ -364,7 +364,7 @@ fn scan_number(c: char, rdr: string_reader) -> token::token {
if str::len(num_str) == 0u {
rdr.fatal(~"no valid digits found for number");
}
let parsed = option::get(u64::from_str_radix(num_str, base as u64));
let parsed = u64::from_str_radix(num_str, base as u64).get();
match tp {
either::Left(t) => return token::LIT_INT(parsed as i64, t),
either::Right(t) => return token::LIT_UINT(parsed, t)
@@ -412,7 +412,7 @@ fn scan_number(c: char, rdr: string_reader) -> token::token {
if str::len(num_str) == 0u {
rdr.fatal(~"no valid digits found for number");
}
let parsed = option::get(u64::from_str_radix(num_str, base as u64));
let parsed = u64::from_str_radix(num_str, base as u64).get();
debug!("lexing %s as an unsuffixed integer literal",
num_str);

View File

@@ -2743,7 +2743,7 @@ impl parser {
token_to_str(self.reader, self.token)));
}
let actual_dtor = do option::map(the_dtor) |dtor| {
let actual_dtor = do the_dtor.map |dtor| {
let (d_body, d_attrs, d_s) = dtor;
{node: {id: self.get_id(),
attrs: d_attrs,
@@ -3111,7 +3111,7 @@ impl parser {
}
}
self.bump();
let mut actual_dtor = do option::map(the_dtor) |dtor| {
let mut actual_dtor = do the_dtor.map |dtor| {
let (d_body, d_attrs, d_s) = dtor;
{node: {id: self.get_id(),
attrs: d_attrs,