aboutsummaryrefslogtreecommitdiff
path: root/src/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.rs')
-rw-r--r--src/parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 73e8dd3..8dbc31e 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -57,13 +57,13 @@ parser! {
// ====================================================================
rule lower_ident() -> String
- = !keyword() s:$(['a'..='z'] ident_tail()*) { s.to_string() }
+ = !keyword() s:$(['_' | 'a'..='z'] ident_tail()*) { s.to_string() }
rule upper_ident() -> String
= !keyword() s:$(['A'..='Z'] ident_tail()*) { s.to_string() }
rule any_ident() -> String
- = !keyword() s:$(['a'..='z' | 'A'..='Z'] ident_tail()*) { s.to_string() }
+ = !keyword() s:$(['_' | 'a'..='z' | 'A'..='Z'] ident_tail()*) { s.to_string() }
rule elem_var() -> String = lower_ident()
rule inst_var() -> String = lower_ident()