@willbooster/tree-sitter-typescript 1.3.4 → 1.3.5
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
|
@@ -146,6 +146,7 @@ module.exports = function defineGrammar(dialect) {
|
|
|
146
146
|
],
|
|
147
147
|
|
|
148
148
|
conflicts: ($, previous) => [
|
|
149
|
+
[$.import_specifier, $._module_export_name],
|
|
149
150
|
[$.export_specifier, $._local_export_specifier, $._module_export_name],
|
|
150
151
|
[$.export_specifier, $._module_export_name],
|
|
151
152
|
[$.export_specifier, $._local_export_specifier],
|
|
@@ -513,14 +514,14 @@ module.exports = function defineGrammar(dialect) {
|
|
|
513
514
|
|
|
514
515
|
_import_identifier: ($) => choice($.identifier, alias('type', $.identifier)),
|
|
515
516
|
|
|
516
|
-
import_specifier: ($) =>
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
517
|
+
import_specifier: ($) => {
|
|
518
|
+
const name = choice($._import_identifier, alias('as', $.identifier));
|
|
519
|
+
const specifier = choice(
|
|
520
|
+
field('name', name),
|
|
521
|
+
seq(field('name', choice($._module_export_name, alias('as', $.identifier))), 'as', field('alias', name))
|
|
522
|
+
);
|
|
523
|
+
return choice(specifier, prec.dynamic(1, seq('type', specifier)));
|
|
524
|
+
},
|
|
524
525
|
|
|
525
526
|
import_attribute: ($) => seq(choice('with', 'assert'), $.object),
|
|
526
527
|
|
package/package.json
CHANGED
package/tree-sitter-tsx.wasm
CHANGED
|
Binary file
|
|
Binary file
|