Skip to content

Commit 2b36699

Browse files
ribru17clason
authored andcommitted
fix: disallow $ from identifiers
query.c does not allow these characters in identifiers, unlike in JS identifiers. Parser generated with 0.25.6.
1 parent 55baffb commit 2b36699

File tree

3 files changed

+22
-40
lines changed

3 files changed

+22
-40
lines changed

grammar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const PREC = {
1111
};
1212

1313
// Identifiers cannot start with `.`
14-
const IDENTIFIER = /[a-zA-Z0-9\-_\$][a-zA-Z0-9.\-_\$]*/;
14+
const IDENTIFIER = /[a-zA-Z0-9\-_][a-zA-Z0-9.\-_]*/;
1515

1616
module.exports = grammar({
1717
name: "query",

src/grammar.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/parser.c

Lines changed: 19 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)