diff --git a/grammar.js b/grammar.js index 8147b24..2fe2862 100644 --- a/grammar.js +++ b/grammar.js @@ -172,7 +172,7 @@ module.exports = grammar({ repeat($._compound_statement_item) ), - preproc_directive: $ => /#[ \t]*\a\w*/, + preproc_directive: $ => /#[ \t]*[a-zA-Z]\w*/, preproc_arg: $ => token(prec(-1, repeat1(choice(/./, '\\\n')))), // Main Grammar @@ -749,7 +749,7 @@ module.exports = grammar({ '>') ), - identifier: $ => /[\a_][\a\d_]*/, + identifier: $ => /[a-zA-Z_]\w*/, true: $ => token(prec(1, choice('TRUE', 'true'))), false: $ => token(prec(1, choice('FALSE', 'false'))), diff --git a/src/grammar.json b/src/grammar.json index 83da58c..bfdc606 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -711,7 +711,7 @@ }, "preproc_directive": { "type": "PATTERN", - "value": "#[ \\t]*\\a\\w*" + "value": "#[ \\t]*[a-zA-Z]\\w*" }, "preproc_arg": { "type": "TOKEN", @@ -3874,7 +3874,7 @@ }, "identifier": { "type": "PATTERN", - "value": "[\\a_][\\a\\d_]*" + "value": "[a-zA-Z_]\\w*" }, "true": { "type": "TOKEN",