@willbooster/tree-sitter-typescript 1.2.11 → 1.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -199,6 +199,7 @@ module.exports = function defineGrammar(dialect) {
199
199
  $.instantiation_expression,
200
200
  ],
201
201
  [$.primary_expression, $.call_expression, $.instantiation_expression],
202
+ [$.expression, $.call_expression],
202
203
  ],
203
204
 
204
205
  inline: ($, previous) => [
@@ -325,6 +326,14 @@ module.exports = function defineGrammar(dialect) {
325
326
  field('type_arguments', optional($.type_arguments)),
326
327
  field('arguments', $.arguments)
327
328
  )
329
+ ),
330
+ // An instantiation expression is no primary expression, but it may be called through `?.` (`f<T>?.(x)`). Without
331
+ // a precedence, GLR also keeps the reading in which it is the object of `?.[0]` or `?.x`.
332
+ seq(
333
+ field('function', $.instantiation_expression),
334
+ field('optional_chain', $.optional_chain),
335
+ field('type_arguments', optional($.type_arguments)),
336
+ field('arguments', $.arguments)
328
337
  )
329
338
  ),
330
339
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-typescript",
3
- "version": "1.2.11",
3
+ "version": "1.2.13",
4
4
  "description": "TypeScript and TSX grammars for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -51,7 +51,7 @@
51
51
  "@vitest/browser-playwright": "5.0.1",
52
52
  "@willbooster/oxfmt-config": "1.2.2",
53
53
  "@willbooster/oxlint-config": "1.4.8",
54
- "@willbooster/tree-sitter-javascript": "1.0.20",
54
+ "@willbooster/tree-sitter-javascript": "1.0.21",
55
55
  "@willbooster/wb": "22.13.1",
56
56
  "@willbooster/web-tree-sitter": "1.0.17",
57
57
  "conventional-changelog-conventionalcommits": "10.4.0",
Binary file
Binary file
package/tree-sitter.json CHANGED
@@ -83,7 +83,7 @@
83
83
  }
84
84
  ],
85
85
  "metadata": {
86
- "version": "1.2.11",
86
+ "version": "1.2.13",
87
87
  "license": "MIT",
88
88
  "description": "TypeScript and TSX grammars for tree-sitter",
89
89
  "authors": [