diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-08-06 12:34:08 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-08-06 15:36:30 -0700 |
| commit | ecaf9e39c9435fa2de4fe393c4b263be36eb2d99 (patch) | |
| tree | 775f69be65adff65551d96173dd797e32e2c3157 /src/libsyntax/parse/attr.rs | |
| parent | d3a9bb1bd4a1d510bbaca2ab1121e4c85a239247 (diff) | |
| download | rust-ecaf9e39c9435fa2de4fe393c4b263be36eb2d99.tar.gz rust-ecaf9e39c9435fa2de4fe393c4b263be36eb2d99.zip | |
Convert alt to match. Stop parsing alt
Diffstat (limited to 'src/libsyntax/parse/attr.rs')
| -rw-r--r-- | src/libsyntax/parse/attr.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsyntax/parse/attr.rs b/src/libsyntax/parse/attr.rs index 006bd3909d8..aefa7264bf6 100644 --- a/src/libsyntax/parse/attr.rs +++ b/src/libsyntax/parse/attr.rs @@ -29,7 +29,7 @@ impl parser_attr of parser_attr for parser { -> attr_or_ext { let expect_item_next = vec::is_not_empty(first_item_attrs); - alt self.token { + match self.token { token::POUND => { let lo = self.span.lo; if self.look_ahead(1u) == token::LBRACKET { @@ -57,7 +57,7 @@ impl parser_attr of parser_attr for parser { fn parse_outer_attributes() -> ~[ast::attribute] { let mut attrs: ~[ast::attribute] = ~[]; loop { - alt copy self.token { + match copy self.token { token::POUND => { if self.look_ahead(1u) != token::LBRACKET { break; @@ -106,7 +106,7 @@ impl parser_attr of parser_attr for parser { let mut inner_attrs: ~[ast::attribute] = ~[]; let mut next_outer_attrs: ~[ast::attribute] = ~[]; loop { - alt copy self.token { + match copy self.token { token::POUND => { if self.look_ahead(1u) != token::LBRACKET { // This is an extension @@ -146,7 +146,7 @@ impl parser_attr of parser_attr for parser { fn parse_meta_item() -> @ast::meta_item { let lo = self.span.lo; let ident = self.parse_ident(); - alt self.token { + match self.token { token::EQ => { self.bump(); let lit = self.parse_lit(); @@ -172,7 +172,7 @@ impl parser_attr of parser_attr for parser { } fn parse_optional_meta() -> ~[@ast::meta_item] { - alt self.token { + match self.token { token::LPAREN => return self.parse_meta_seq(), _ => return ~[] } |
