From e792ec3eca6214329d053715a6477cc4f7a05672 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 10 Feb 2018 14:17:38 +0300 Subject: G: use name refs in paths --- src/parser/grammar/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/parser/grammar/mod.rs') 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) { } } +fn name_ref(p: &mut Parser) { + if p.at(IDENT) { + let m = p.start(); + p.bump(); + m.complete(p, NAME_REF); + } else { + p.error("expected identifier"); + } +} + fn error_block(p: &mut Parser, message: &str) { assert!(p.at(L_CURLY)); let err = p.start(); -- cgit v1.2.3