aboutsummaryrefslogtreecommitdiff
path: root/src/parser/grammar/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser/grammar/mod.rs')
-rw-r--r--src/parser/grammar/mod.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/parser/grammar/mod.rs b/src/parser/grammar/mod.rs
index 6e82d7c69..abf9fe86c 100644
--- a/src/parser/grammar/mod.rs
+++ b/src/parser/grammar/mod.rs
@@ -60,6 +60,16 @@ fn name(p: &mut Parser) {
60 } 60 }
61} 61}
62 62
63fn name_ref(p: &mut Parser) {
64 if p.at(IDENT) {
65 let m = p.start();
66 p.bump();
67 m.complete(p, NAME_REF);
68 } else {
69 p.error("expected identifier");
70 }
71}
72
63fn error_block(p: &mut Parser, message: &str) { 73fn error_block(p: &mut Parser, message: &str) {
64 assert!(p.at(L_CURLY)); 74 assert!(p.at(L_CURLY));
65 let err = p.start(); 75 let err = p.start();