@willbooster/tree-sitter-kotlin 9.0.1 → 9.0.3
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 +11 -2
- package/package.json +1 -1
- package/tree-sitter-kotlin.wasm +0 -0
- package/tree-sitter.json +1 -1
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(
|
|
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
package/tree-sitter-kotlin.wasm
CHANGED
|
Binary file
|