cleanup
This commit is contained in:
12
grammar.js
12
grammar.js
@@ -41,6 +41,12 @@ module.exports = grammar({
|
||||
'}',
|
||||
),
|
||||
|
||||
// TODO: not to spec, but maybe good enough
|
||||
identifier: $ => token(seq(
|
||||
unicodeLetter,
|
||||
repeat(choice(unicodeLetter, unicodeDigit, unicodePunctuation))
|
||||
)),
|
||||
|
||||
expression: $ => choice(
|
||||
$.expr_term,
|
||||
//$.operation,
|
||||
@@ -113,12 +119,6 @@ module.exports = grammar({
|
||||
// TODO: string_literals are special template literals
|
||||
string_lit: $ => seq('"', /\w+/, '"'),
|
||||
|
||||
// TODO: not to spec, but maybe good enough
|
||||
identifier: $ => token(seq(
|
||||
unicodeLetter,
|
||||
repeat(choice(unicodeLetter, unicodeDigit, unicodePunctuation))
|
||||
)),
|
||||
|
||||
// http://stackoverflow.com/questions/13014947/regex-to-match-a-c-style-multiline-comment/36328890#36328890
|
||||
comment: $ => token(choice(
|
||||
seq('#', /.*/),
|
||||
|
||||
Reference in New Issue
Block a user