Skip to content

Commit 7ee90cc

Browse files
committed
syntax: Rename is_word to is_keyword, etc.
1 parent 5a0c564 commit 7ee90cc

File tree

2 files changed

+97
-92
lines changed

2 files changed

+97
-92
lines changed

src/librustsyntax/parse/common.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ fn require_keyword(p: parser, word: str) {
5858
}
5959
}
6060

61-
fn is_word(p: parser, word: str) -> bool {
61+
fn is_keyword(p: parser, word: str) -> bool {
6262
require_keyword(p, word);
6363
ret alt p.token {
6464
token::IDENT(sid, false) { str::eq(word, p.get_str(sid)) }
6565
_ { false }
6666
};
6767
}
6868

69-
fn eat_word(p: parser, word: str) -> bool {
69+
fn eat_keyword(p: parser, word: str) -> bool {
7070
require_keyword(p, word);
7171
alt p.token {
7272
token::IDENT(sid, false) {
@@ -79,9 +79,9 @@ fn eat_word(p: parser, word: str) -> bool {
7979
}
8080
}
8181

82-
fn expect_word(p: parser, word: str) {
82+
fn expect_keyword(p: parser, word: str) {
8383
require_keyword(p, word);
84-
if !eat_word(p, word) {
84+
if !eat_keyword(p, word) {
8585
p.fatal("expecting " + word + ", found " +
8686
token_to_str(p.reader, p.token));
8787
}

0 commit comments

Comments
 (0)