std/extra: changing XXX to FIXME; cleanup
* Get rid of by-value-self workarounds; it works now * Remove type annotations, they're not needed anymore
This commit is contained in:
parent
77279a73cb
commit
5da4b4d928
10 changed files with 49 additions and 44 deletions
|
@ -5061,12 +5061,19 @@ impl Parser {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn parse_str(&self) -> @str {
|
||||
pub fn parse_optional_str(&self) -> Option<@str> {
|
||||
match *self.token {
|
||||
token::LIT_STR(s) => {
|
||||
self.bump();
|
||||
ident_to_str(&s)
|
||||
Some(ident_to_str(&s))
|
||||
}
|
||||
_ => None
|
||||
}
|
||||
}
|
||||
|
||||
pub fn parse_str(&self) -> @str {
|
||||
match self.parse_optional_str() {
|
||||
Some(s) => { s }
|
||||
_ => self.fatal("expected string literal")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue