diff options
| author | Brian Anderson <banderson@mozilla.com> | 2012-09-19 11:06:50 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2012-09-19 11:44:05 -0700 |
| commit | 0c82c00dc4f49aeb9b57c92c9a40ae35d8a1ee29 (patch) | |
| tree | f0b2ccdd691ebf73ca2f5e676aaceb058d109463 /src/libsyntax/parse/common.rs | |
| parent | 76f8cfb26c7aa38cf066c42ea500a57d48fc828d (diff) | |
| download | rust-0c82c00dc4f49aeb9b57c92c9a40ae35d8a1ee29.tar.gz rust-0c82c00dc4f49aeb9b57c92c9a40ae35d8a1ee29.zip | |
libsyntax: Remove the restricted keyword concept
Diffstat (limited to 'src/libsyntax/parse/common.rs')
| -rw-r--r-- | src/libsyntax/parse/common.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/libsyntax/parse/common.rs b/src/libsyntax/parse/common.rs index a498b69527a..4b8bfcda848 100644 --- a/src/libsyntax/parse/common.rs +++ b/src/libsyntax/parse/common.rs @@ -37,9 +37,6 @@ trait parser_common { fn is_any_keyword(tok: token::token) -> bool; fn eat_keyword(word: ~str) -> bool; fn expect_keyword(word: ~str); - fn is_restricted_keyword(word: ~str) -> bool; - fn check_restricted_keywords(); - fn check_restricted_keywords_(w: ~str); fn expect_gt(); fn parse_seq_to_before_gt<T: Copy>(sep: Option<token::token>, f: fn(parser) -> T) -> ~[T]; @@ -104,7 +101,6 @@ impl parser: parser_common { } fn parse_value_ident() -> ast::ident { - self.check_restricted_keywords(); return self.parse_ident(); } @@ -165,26 +161,6 @@ impl parser: parser_common { } } - fn is_restricted_keyword(word: ~str) -> bool { - self.restricted_keywords.contains_key_ref(&word) - } - - fn check_restricted_keywords() { - match self.token { - token::IDENT(_, false) => { - let w = token_to_str(self.reader, self.token); - self.check_restricted_keywords_(w); - } - _ => () - } - } - - fn check_restricted_keywords_(w: ~str) { - if self.is_restricted_keyword(w) { - self.fatal(~"found `" + w + ~"` in restricted position"); - } - } - fn is_strict_keyword(word: ~str) -> bool { self.strict_keywords.contains_key_ref(&word) } |
