@willbooster/tree-sitter-typescript 1.3.0 → 1.3.1
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.
package/common/defineGrammar.js
CHANGED
|
@@ -3,6 +3,7 @@ const JavaScript = require('@willbooster/tree-sitter-javascript/grammar');
|
|
|
3
3
|
|
|
4
4
|
// Words that are keywords only in some positions and identifiers elsewhere, besides the JavaScript grammar's.
|
|
5
5
|
const TYPESCRIPT_CONTEXTUAL_KEYWORDS = [
|
|
6
|
+
'accessor',
|
|
6
7
|
'declare',
|
|
7
8
|
'global',
|
|
8
9
|
'namespace',
|
|
@@ -215,9 +216,6 @@ module.exports = function defineGrammar(dialect) {
|
|
|
215
216
|
],
|
|
216
217
|
|
|
217
218
|
rules: {
|
|
218
|
-
// A field named `get`, `set`, or `static` is told apart from a member that the word modifies by the line-break
|
|
219
|
-
// sentinels allowed right after the name, as in the JavaScript grammar's field_definition. They are not allowed
|
|
220
|
-
// after a type annotation, which may continue on the next line.
|
|
221
219
|
public_field_definition: ($) =>
|
|
222
220
|
seq(
|
|
223
221
|
repeat(field('decorator', $.decorator)),
|
|
@@ -233,7 +231,8 @@ module.exports = function defineGrammar(dialect) {
|
|
|
233
231
|
seq(optional('static'), optional($.override_modifier), optional('readonly')),
|
|
234
232
|
seq(optional('abstract'), optional('readonly')),
|
|
235
233
|
seq(optional('readonly'), optional('abstract')),
|
|
236
|
-
optional('accessor')
|
|
234
|
+
seq(optional('static'), optional($.override_modifier), 'accessor'),
|
|
235
|
+
seq('abstract', optional($.override_modifier), optional('accessor'))
|
|
237
236
|
),
|
|
238
237
|
choice(
|
|
239
238
|
seq(
|
|
@@ -269,7 +268,8 @@ module.exports = function defineGrammar(dialect) {
|
|
|
269
268
|
seq($.override_modifier, optional('readonly')),
|
|
270
269
|
seq('readonly', optional('abstract')),
|
|
271
270
|
seq('abstract', optional('readonly')),
|
|
272
|
-
'accessor'
|
|
271
|
+
seq(optional('static'), optional($.override_modifier), 'accessor'),
|
|
272
|
+
seq('abstract', optional($.override_modifier), optional('accessor'))
|
|
273
273
|
),
|
|
274
274
|
field('name', alias('static', $.property_identifier)),
|
|
275
275
|
choice(
|
package/package.json
CHANGED
package/queries/highlights.scm
CHANGED
package/tree-sitter-tsx.wasm
CHANGED
|
Binary file
|
|
Binary file
|