@willbooster/tree-sitter-kotlin 9.0.2 → 9.0.4

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/grammar.js CHANGED
@@ -89,7 +89,6 @@ module.exports = grammar({
89
89
  [$._modifier_context_parameters],
90
90
  [$.secondary_constructor, $._reserved_identifier],
91
91
  [$.enum_entry, $.modifiers],
92
- [$.qualified_identifier],
93
92
  [$.constructor_invocation, $._unescaped_annotation],
94
93
  [$.nullable_type],
95
94
  [$.non_nullable_type],
@@ -150,6 +149,8 @@ module.exports = grammar({
150
149
  sym('_companion_name_position'),
151
150
  sym('_try_continuation_position'),
152
151
  sym('_infix_get_identifier'),
152
+ sym('_import_end'),
153
+ sym('_import_continue'),
153
154
  ],
154
155
 
155
156
  inline: ($) => [$._statements, $._identifier, $._control_structure_body, $._non_function_type],
@@ -226,7 +227,13 @@ module.exports = grammar({
226
227
  package_header: ($) => seq('package', $.qualified_identifier, optional(';')),
227
228
 
228
229
  import: ($) =>
229
- seq('import', $.qualified_identifier, optional(choice(seq('.', '*'), seq('as', $.identifier))), optional(';')),
230
+ seq(
231
+ 'import',
232
+ alias($._import_qualified_identifier, $.qualified_identifier),
233
+ sym('_import_end'),
234
+ optional(choice(seq('.', '*'), seq('as', $.identifier))),
235
+ optional(';')
236
+ ),
230
237
 
231
238
  declaration: ($) =>
232
239
  choice($.class_declaration, $.object_declaration, $.function_declaration, $.property_declaration, $.type_alias),
@@ -1007,6 +1014,8 @@ module.exports = grammar({
1007
1014
 
1008
1015
  type_parameter_modifiers: ($) => repeat1(choice($.reification_modifier, $.variance_modifier, $.annotation)),
1009
1016
 
1017
+ _import_qualified_identifier: ($) => seq($.identifier, repeat(seq(sym('_import_continue'), '.', $.identifier))),
1018
+
1010
1019
  qualified_identifier: ($) => seq($.identifier, repeat(seq('.', $.identifier))),
1011
1020
 
1012
1021
  label: () => token(/[a-zA-Z_][a-zA-Z_0-9]*@/),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-kotlin",
3
- "version": "9.0.2",
3
+ "version": "9.0.4",
4
4
  "description": "Kotlin grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
Binary file
package/tree-sitter.json CHANGED
@@ -13,7 +13,7 @@
13
13
  }
14
14
  ],
15
15
  "metadata": {
16
- "version": "9.0.2",
16
+ "version": "9.0.4",
17
17
  "license": "MIT",
18
18
  "description": "Kotlin grammar for tree-sitter",
19
19
  "authors": [