From 6188fa4c32160846908e4ff7654c4ff7bc177797 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sat, 13 Jun 2026 00:21:12 -0700 Subject: Adding root access in identifiers. There's an issue, it doesn't compile yet. --- src/parser.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/parser.rs') diff --git a/src/parser.rs b/src/parser.rs index fff00b1..d1fe4d7 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -360,7 +360,7 @@ impl Parser { tb.add_param( ParamValue::Literal(s.to_string()) ); ctx.next(); } - SymbolType::Token(_) => { + SymbolType::Token(_) | SymbolType::Sharp => { if ctx.peek().is("tag data", |s| *s == SymbolType::Equals)? { break; } @@ -377,6 +377,10 @@ impl Parser { fn parse_identifier(&self, ctx: &mut Context ) -> CrimResult { let mut id = Identifier::new(); + if ctx.cur().is("identifier",|s| matches!( s, SymbolType::Sharp))? { + id.push( IdentifierValue::Root ); + ctx.next(); + } loop { if ctx.cur().is("identifier",|s| matches!( s, SymbolType::Token(_) ))? { if let SymbolType::Token(s) = ctx.cur().unwrap().symbol() { -- cgit v1.2.3