libsyntax: Fix test and merge fallout.
This commit is contained in:
parent
8b088d493c
commit
f3eee0ebad
|
@ -635,7 +635,7 @@ mod test {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test] fn parse_ident_pat () {
|
#[test] fn parse_ident_pat () {
|
||||||
let parser = string_to_parser(@"b");
|
let mut parser = string_to_parser(@"b");
|
||||||
assert_eq!(parser.parse_pat(),
|
assert_eq!(parser.parse_pat(),
|
||||||
@ast::Pat{id: ast::DUMMY_NODE_ID,
|
@ast::Pat{id: ast::DUMMY_NODE_ID,
|
||||||
node: ast::PatIdent(
|
node: ast::PatIdent(
|
||||||
|
|
|
@ -4442,12 +4442,12 @@ impl Parser {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if *self.token == token::LPAREN {
|
if self.token == token::LPAREN {
|
||||||
// `extern mod foo (name = "bar"[,vers = "version"]) is obsolete,
|
// `extern mod foo (name = "bar"[,vers = "version"]) is obsolete,
|
||||||
// `extern mod foo = "bar#[version]";` should be used.
|
// `extern mod foo = "bar#[version]";` should be used.
|
||||||
// Parse obsolete options to avoid wired parser errors
|
// Parse obsolete options to avoid wired parser errors
|
||||||
self.parse_optional_meta();
|
self.parse_optional_meta();
|
||||||
self.obsolete(*self.span, ObsoleteExternModAttributesInParens);
|
self.obsolete(self.span, ObsoleteExternModAttributesInParens);
|
||||||
}
|
}
|
||||||
// extern mod foo;
|
// extern mod foo;
|
||||||
self.expect(&token::SEMI);
|
self.expect(&token::SEMI);
|
||||||
|
|
|
@ -55,7 +55,7 @@ pub fn string_to_crate (source_str : @str) -> ast::Crate {
|
||||||
|
|
||||||
// parse a string, return a crate and the ParseSess
|
// parse a string, return a crate and the ParseSess
|
||||||
pub fn string_to_crate_and_sess (source_str : @str) -> (ast::Crate,@mut ParseSess) {
|
pub fn string_to_crate_and_sess (source_str : @str) -> (ast::Crate,@mut ParseSess) {
|
||||||
let (p,ps) = string_to_parser_and_sess(source_str);
|
let (mut p,ps) = string_to_parser_and_sess(source_str);
|
||||||
(p.parse_crate_mod(),ps)
|
(p.parse_crate_mod(),ps)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue