Updated parser to accept underscores in variable names

This commit is contained in:
Stefan Zermatten
2020-11-05 14:50:44 +02:00
parent 46385dd9b2
commit 4dad2c41e5
2 changed files with 2 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ function id(x) { return x[0]; }
value: s => s.slice(1, -1),
},
name: {
match: /[a-zA-Z]+\w*?/,
match: /[a-zA-Z_]+/,
type: moo.keywords({
'keywords': ['d'],
}),

View File

@@ -21,7 +21,7 @@
value: s => s.slice(1, -1),
},
name: {
match: /[a-zA-Z]+\w*?/,
match: /[a-zA-Z_]+/,
type: moo.keywords({
'keywords': ['d'],
}),