Skip to content

Commit

Permalink
fixed the tree-sitter grammar to allow any primary term on rhs of IN (t…
Browse files Browse the repository at this point in the history
…ree-sitter#9)

* fixed the tree-sitter grammar to allow any primary term on rhs of keyword IN

* bump the codeql sha for tree-sitter CI to the current HEAD

Co-authored-by: Timothy Clem <[email protected]>
  • Loading branch information
ginsbach and tclem authored Sep 16, 2020
1 parent 8474d90 commit a0d688d
Show file tree
Hide file tree
Showing 6 changed files with 29,450 additions and 29,113 deletions.
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ module.exports = grammar({
in_expr: $ => prec.left(7, seq(
field('left', $._exprOrTerm),
'in',
field('right', $.range)
field('right', $._primary)
)),
comp_term: $ => prec.left(6, seq(
field('left', $._exprOrTerm),
Expand Down
2 changes: 1 addition & 1 deletion script/fetch-examples
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ function checkout() {
popd
}

checkout examples/codeql github/codeql 39137510ba9d47f517bebcfc9770f6219cfd397d
checkout examples/codeql github/codeql 86404af50100b409b18e62651295e79393a6016a
6 changes: 3 additions & 3 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -1081,7 +1081,7 @@
"name": "right",
"content": {
"type": "SYMBOL",
"name": "range"
"name": "_primary"
}
}
]
Expand Down Expand Up @@ -2443,7 +2443,7 @@
},
"qldoc": {
"type": "PATTERN",
"value": "\\/\\*\\*[^*]*\\*+([^\\/*][^*]*\\*+)*\\/"
"value": "\\/\\*\\*[^*]*\\*+([^/*][^*]*\\*+)*\\/"
},
"literalId": {
"type": "CHOICE",
Expand Down Expand Up @@ -2865,7 +2865,7 @@
},
"block_comment": {
"type": "PATTERN",
"value": "\\/\\*([^*]+\\*+([^\\/*][^*]*\\*+)*|\\*)\\/"
"value": "\\/\\*([^*]+\\*+([^/*][^*]*\\*+)*|\\*)\\/"
},
"false": {
"type": "STRING",
Expand Down
32 changes: 32 additions & 0 deletions src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -2674,9 +2674,41 @@
"multiple": false,
"required": true,
"types": [
{
"type": "aggregate",
"named": true
},
{
"type": "call_or_unqual_agg_expr",
"named": true
},
{
"type": "literal",
"named": true
},
{
"type": "par_expr",
"named": true
},
{
"type": "qualified_expr",
"named": true
},
{
"type": "range",
"named": true
},
{
"type": "set_literal",
"named": true
},
{
"type": "super_ref",
"named": true
},
{
"type": "variable",
"named": true
}
]
}
Expand Down
Loading

0 comments on commit a0d688d

Please sign in to comment.