We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a0c564 commit 7ee90ccCopy full SHA for 7ee90cc
src/librustsyntax/parse/common.rs
@@ -58,15 +58,15 @@ fn require_keyword(p: parser, word: str) {
58
}
59
60
61
-fn is_word(p: parser, word: str) -> bool {
+fn is_keyword(p: parser, word: str) -> bool {
62
require_keyword(p, word);
63
ret alt p.token {
64
token::IDENT(sid, false) { str::eq(word, p.get_str(sid)) }
65
_ { false }
66
};
67
68
69
-fn eat_word(p: parser, word: str) -> bool {
+fn eat_keyword(p: parser, word: str) -> bool {
70
71
alt p.token {
72
token::IDENT(sid, false) {
@@ -79,9 +79,9 @@ fn eat_word(p: parser, word: str) -> bool {
79
80
81
82
-fn expect_word(p: parser, word: str) {
+fn expect_keyword(p: parser, word: str) {
83
84
- if !eat_word(p, word) {
+ if !eat_keyword(p, word) {
85
p.fatal("expecting " + word + ", found " +
86
token_to_str(p.reader, p.token));
87
0 commit comments