Rename 'contextual' keywords to 'temporary'

This commit is contained in:
Brian Anderson 2012-09-12 15:22:34 -07:00
parent 287114a3b9
commit 3057790f4b

View File

@ -362,15 +362,15 @@ fn mk_fake_ident_interner() -> ident_interner {
/** /**
* All the valid words that have meaning in the Rust language. * All the valid words that have meaning in the Rust language.
* *
* Rust keywords are either 'contextual', 'restricted', or 'strict'. * Rust keywords are either 'temporary', 'restricted', or 'strict'. Temporary
* Contextual keywords may be used as identifiers because their appearance in * keywords are contextual and may be used as identifiers anywhere. They are
* the grammar is unambiguous. Restricted keywords may not appear in positions * expected to disappear from the grammar soon. Restricted keywords may not
* that might otherwise contain _value identifiers_. Strict keywords may not * appear in positions that might otherwise contain _value identifiers_.
* appear as identifiers. * Strict keywords may not appear as identifiers at all.
*/ */
fn keyword_table() -> HashMap<~str, ()> { fn keyword_table() -> HashMap<~str, ()> {
let keywords = str_hash(); let keywords = str_hash();
for contextual_keyword_table().each_key |word| { for temporary_keyword_table().each_key |word| {
keywords.insert(word, ()); keywords.insert(word, ());
} }
for restricted_keyword_table().each_key |word| { for restricted_keyword_table().each_key |word| {
@ -386,7 +386,7 @@ fn keyword_table() -> HashMap<~str, ()> {
} }
/// Keywords that may be used as identifiers /// Keywords that may be used as identifiers
fn contextual_keyword_table() -> HashMap<~str, ()> { fn temporary_keyword_table() -> HashMap<~str, ()> {
let words = str_hash(); let words = str_hash();
let keys = ~[ let keys = ~[
~"self", ~"static", ~"self", ~"static",