Skip to content

Commit

Permalink
convert pure to a reserved keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
thestinger committed Aug 1, 2013
1 parent dabd476 commit b57ffef
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions src/libsyntax/parse/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,23 +458,23 @@ fn mk_fresh_ident_interner() -> @ident_interner {
"once", // 50
"priv", // 51
"pub", // 52
"pure", // 53
"ref", // 54
"return", // 55
"ref", // 53
"return", // 54
"static", // 27 -- also a special ident
"self", // 8 -- also a special ident
"struct", // 56
"super", // 57
"true", // 58
"trait", // 59
"type", // 60
"unsafe", // 61
"use", // 62
"while", // 63
"in", // 64
"foreach", // 65

"be", // 66
"struct", // 55
"super", // 56
"true", // 57
"trait", // 58
"type", // 59
"unsafe", // 60
"use", // 61
"while", // 62
"in", // 63
"foreach", // 64

"be", // 65
"pure", // 66
];

@ident_interner {
Expand Down Expand Up @@ -615,10 +615,10 @@ pub mod keywords {
False => ident { name: 39, ctxt: 0 },
Fn => ident { name: 40, ctxt: 0 },
For => ident { name: 41, ctxt: 0 },
ForEach => ident { name: 65, ctxt: 0 },
ForEach => ident { name: 64, ctxt: 0 },
If => ident { name: 42, ctxt: 0 },
Impl => ident { name: 43, ctxt: 0 },
In => ident { name: 64, ctxt: 0 },
In => ident { name: 63, ctxt: 0 },
Let => ident { name: 44, ctxt: 0 },
__Log => ident { name: 45, ctxt: 0 },
Loop => ident { name: 46, ctxt: 0 },
Expand All @@ -628,20 +628,20 @@ pub mod keywords {
Once => ident { name: 50, ctxt: 0 },
Priv => ident { name: 51, ctxt: 0 },
Pub => ident { name: 52, ctxt: 0 },
Pure => ident { name: 53, ctxt: 0 },
Ref => ident { name: 54, ctxt: 0 },
Return => ident { name: 55, ctxt: 0 },
Pure => ident { name: 66, ctxt: 0 },
Ref => ident { name: 53, ctxt: 0 },
Return => ident { name: 54, ctxt: 0 },
Static => ident { name: 27, ctxt: 0 },
Self => ident { name: 8, ctxt: 0 },
Struct => ident { name: 56, ctxt: 0 },
Super => ident { name: 57, ctxt: 0 },
True => ident { name: 58, ctxt: 0 },
Trait => ident { name: 59, ctxt: 0 },
Type => ident { name: 60, ctxt: 0 },
Unsafe => ident { name: 61, ctxt: 0 },
Use => ident { name: 62, ctxt: 0 },
While => ident { name: 63, ctxt: 0 },
Be => ident { name: 66, ctxt: 0 },
Struct => ident { name: 55, ctxt: 0 },
Super => ident { name: 56, ctxt: 0 },
True => ident { name: 57, ctxt: 0 },
Trait => ident { name: 58, ctxt: 0 },
Type => ident { name: 59, ctxt: 0 },
Unsafe => ident { name: 60, ctxt: 0 },
Use => ident { name: 61, ctxt: 0 },
While => ident { name: 62, ctxt: 0 },
Be => ident { name: 65, ctxt: 0 },
}
}
}
Expand All @@ -667,7 +667,7 @@ pub fn is_any_keyword(tok: &Token) -> bool {
pub fn is_strict_keyword(tok: &Token) -> bool {
match *tok {
token::IDENT(sid, false) => match sid.name {
8 | 27 | 32 .. 65 => true,
8 | 27 | 32 .. 64 => true,
_ => false,
},
_ => false,
Expand All @@ -677,7 +677,7 @@ pub fn is_strict_keyword(tok: &Token) -> bool {
pub fn is_reserved_keyword(tok: &Token) -> bool {
match *tok {
token::IDENT(sid, false) => match sid.name {
66 => true,
65 .. 66 => true,
_ => false,
},
_ => false,
Expand Down

5 comments on commit b57ffef

@bors
Copy link
Contributor

@bors bors commented on b57ffef Aug 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on b57ffef Aug 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging thestinger/rust/no-copy = b57ffef into auto

@bors
Copy link
Contributor

@bors bors commented on b57ffef Aug 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thestinger/rust/no-copy = b57ffef merged ok, testing candidate = 8ec70ae

@bors
Copy link
Contributor

@bors bors commented on b57ffef Aug 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 8ec70ae

Please sign in to comment.