Fixed grammar to account for d8 not being a name
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// Must contain a letter, and be made of word characters only
|
||||
const VARIABLE_NAME_REGEX = /^[a-zA-Z~][a-zA-Z_0-9]+$/i;
|
||||
const VARIABLE_NAME_REGEX = /^[~#]?[a-zA-Z]*[a-ce-zA-Z][a-zA-Z0-9_]*$/i;
|
||||
|
||||
export default VARIABLE_NAME_REGEX;
|
||||
|
||||
@@ -13,7 +13,7 @@ function id(x) { return x[0]; }
|
||||
value: s => s.slice(1, -1).replace('\\n', '\n'),
|
||||
},
|
||||
name: {
|
||||
match: /[a-zA-Z~#][a-zA-Z0-9_]+/,
|
||||
match: /[~#]?[a-zA-Z]*[a-ce-zA-Z][a-zA-Z0-9_]*/,
|
||||
type: moo.keywords({
|
||||
'keywords': ['true', 'false'],
|
||||
}),
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
value: s => s.slice(1, -1).replace('\\n', '\n'),
|
||||
},
|
||||
name: {
|
||||
match: /[a-zA-Z~#][a-zA-Z0-9_]+/,
|
||||
match: /[~#]?[a-zA-Z]*[a-ce-zA-Z][a-zA-Z0-9_]*/,
|
||||
type: moo.keywords({
|
||||
'keywords': ['true', 'false'],
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user