From 0c82c00dc4f49aeb9b57c92c9a40ae35d8a1ee29 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 19 Sep 2012 11:06:50 -0700 Subject: libsyntax: Remove the restricted keyword concept --- src/libsyntax/parse/common.rs | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'src/libsyntax/parse/common.rs') 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(sep: Option, 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) } -- cgit 1.4.1-3-g733a5