tree-sitter-objectscript 1.9.5 → 1.9.6
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/core/src/parser.c +15 -15
- package/expr/grammar.js +3 -3
- package/expr/src/node-types.json +1 -1
- package/expr/src/parser.c +15 -15
- package/objectscript/src/node-types.json +9 -24
- package/objectscript/src/parser.c +104 -104
- package/objectscript_routine/src/parser.c +15 -15
- package/package.json +1 -1
- package/prebuilds/darwin-arm64/tree-sitter-objectscript.node +0 -0
- package/prebuilds/darwin-x64/tree-sitter-objectscript.node +0 -0
- package/prebuilds/linux-arm64/tree-sitter-objectscript.node +0 -0
- package/prebuilds/linux-x64/tree-sitter-objectscript.node +0 -0
- package/prebuilds/win32-arm64/tree-sitter-objectscript.node +0 -0
- package/prebuilds/win32-x64/tree-sitter-objectscript.node +0 -0
- package/tree-sitter.json +1 -1
- package/udl/grammar.js +20 -19
- package/udl/src/node-types.json +9 -24
- package/udl/src/parser.c +68 -68
package/core/src/parser.c
CHANGED
|
@@ -133,7 +133,7 @@ enum ts_symbol_identifiers {
|
|
|
133
133
|
anon_sym_false = 103,
|
|
134
134
|
sym_json_null_literal = 104,
|
|
135
135
|
sym_identifier = 105,
|
|
136
|
-
|
|
136
|
+
aux_sym__quote_permitting_identifier_token1 = 106,
|
|
137
137
|
anon_sym_SLASH_SLASH = 107,
|
|
138
138
|
anon_sym_POUND_SEMI = 108,
|
|
139
139
|
anon_sym_SEMI = 109,
|
|
@@ -371,7 +371,7 @@ enum ts_symbol_identifiers {
|
|
|
371
371
|
sym_json_array_literal = 341,
|
|
372
372
|
sym_json_boolean_literal = 342,
|
|
373
373
|
sym__expression_list = 343,
|
|
374
|
-
|
|
374
|
+
sym__quote_permitting_identifier = 344,
|
|
375
375
|
sym_statements = 345,
|
|
376
376
|
sym_line_comment_1 = 346,
|
|
377
377
|
sym_line_comment_2 = 347,
|
|
@@ -702,7 +702,7 @@ static const char * const ts_symbol_names[] = {
|
|
|
702
702
|
[anon_sym_false] = "false",
|
|
703
703
|
[sym_json_null_literal] = "json_null_literal",
|
|
704
704
|
[sym_identifier] = "identifier",
|
|
705
|
-
[
|
|
705
|
+
[aux_sym__quote_permitting_identifier_token1] = "identifier",
|
|
706
706
|
[anon_sym_SLASH_SLASH] = "//",
|
|
707
707
|
[anon_sym_POUND_SEMI] = "#;",
|
|
708
708
|
[anon_sym_SEMI] = ";",
|
|
@@ -940,7 +940,7 @@ static const char * const ts_symbol_names[] = {
|
|
|
940
940
|
[sym_json_array_literal] = "json_array_literal",
|
|
941
941
|
[sym_json_boolean_literal] = "json_boolean_literal",
|
|
942
942
|
[sym__expression_list] = "_expression_list",
|
|
943
|
-
[
|
|
943
|
+
[sym__quote_permitting_identifier] = "class_name",
|
|
944
944
|
[sym_statements] = "statements",
|
|
945
945
|
[sym_line_comment_1] = "line_comment_1",
|
|
946
946
|
[sym_line_comment_2] = "line_comment_2",
|
|
@@ -1271,7 +1271,7 @@ static const TSSymbol ts_symbol_map[] = {
|
|
|
1271
1271
|
[anon_sym_false] = anon_sym_false,
|
|
1272
1272
|
[sym_json_null_literal] = sym_json_null_literal,
|
|
1273
1273
|
[sym_identifier] = sym_identifier,
|
|
1274
|
-
[
|
|
1274
|
+
[aux_sym__quote_permitting_identifier_token1] = sym_identifier,
|
|
1275
1275
|
[anon_sym_SLASH_SLASH] = anon_sym_SLASH_SLASH,
|
|
1276
1276
|
[anon_sym_POUND_SEMI] = anon_sym_POUND_SEMI,
|
|
1277
1277
|
[anon_sym_SEMI] = anon_sym_SEMI,
|
|
@@ -1509,7 +1509,7 @@ static const TSSymbol ts_symbol_map[] = {
|
|
|
1509
1509
|
[sym_json_array_literal] = sym_json_array_literal,
|
|
1510
1510
|
[sym_json_boolean_literal] = sym_json_boolean_literal,
|
|
1511
1511
|
[sym__expression_list] = sym__expression_list,
|
|
1512
|
-
[
|
|
1512
|
+
[sym__quote_permitting_identifier] = sym_class_name,
|
|
1513
1513
|
[sym_statements] = sym_statements,
|
|
1514
1514
|
[sym_line_comment_1] = sym_line_comment_1,
|
|
1515
1515
|
[sym_line_comment_2] = sym_line_comment_2,
|
|
@@ -2158,9 +2158,9 @@ static const TSSymbolMetadata ts_symbol_metadata[] = {
|
|
|
2158
2158
|
.visible = true,
|
|
2159
2159
|
.named = true,
|
|
2160
2160
|
},
|
|
2161
|
-
[
|
|
2162
|
-
.visible =
|
|
2163
|
-
.named =
|
|
2161
|
+
[aux_sym__quote_permitting_identifier_token1] = {
|
|
2162
|
+
.visible = true,
|
|
2163
|
+
.named = true,
|
|
2164
2164
|
},
|
|
2165
2165
|
[anon_sym_SLASH_SLASH] = {
|
|
2166
2166
|
.visible = true,
|
|
@@ -3110,7 +3110,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = {
|
|
|
3110
3110
|
.visible = false,
|
|
3111
3111
|
.named = true,
|
|
3112
3112
|
},
|
|
3113
|
-
[
|
|
3113
|
+
[sym__quote_permitting_identifier] = {
|
|
3114
3114
|
.visible = true,
|
|
3115
3115
|
.named = true,
|
|
3116
3116
|
},
|
|
@@ -29726,7 +29726,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
|
|
|
29726
29726
|
('a' <= lookahead && lookahead <= 'z')) ADVANCE(1541);
|
|
29727
29727
|
END_STATE();
|
|
29728
29728
|
case 1542:
|
|
29729
|
-
ACCEPT_TOKEN(
|
|
29729
|
+
ACCEPT_TOKEN(aux_sym__quote_permitting_identifier_token1);
|
|
29730
29730
|
if (lookahead == '"') ADVANCE(59);
|
|
29731
29731
|
END_STATE();
|
|
29732
29732
|
case 1543:
|
|
@@ -912721,10 +912721,10 @@ static const uint16_t ts_small_parse_table[] = {
|
|
|
912721
912721
|
ACTIONS(11), 1,
|
|
912722
912722
|
anon_sym_SLASH_STAR,
|
|
912723
912723
|
STATE(11643), 1,
|
|
912724
|
-
|
|
912724
|
+
sym__quote_permitting_identifier,
|
|
912725
912725
|
ACTIONS(13843), 2,
|
|
912726
912726
|
sym_identifier,
|
|
912727
|
-
|
|
912727
|
+
aux_sym__quote_permitting_identifier_token1,
|
|
912728
912728
|
ACTIONS(13), 3,
|
|
912729
912729
|
sym__whitespace,
|
|
912730
912730
|
sym_inline_comment,
|
|
@@ -962007,7 +962007,7 @@ static const TSParseActionEntry ts_parse_actions[] = {
|
|
|
962007
962007
|
[14841] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11868),
|
|
962008
962008
|
[14843] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7749),
|
|
962009
962009
|
[14845] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3600),
|
|
962010
|
-
[14847] = {.entry = {.count = 1, .reusable = true}}, REDUCE(
|
|
962010
|
+
[14847] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__quote_permitting_identifier, 1, 0, 0),
|
|
962011
962011
|
[14849] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10205),
|
|
962012
962012
|
[14851] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2421),
|
|
962013
962013
|
[14853] = {.entry = {.count = 1, .reusable = true}}, SHIFT(428),
|
|
@@ -963344,7 +963344,7 @@ TS_PUBLIC const TSLanguage *tree_sitter_objectscript_core(void) {
|
|
|
963344
963344
|
.metadata = {
|
|
963345
963345
|
.major_version = 1,
|
|
963346
963346
|
.minor_version = 9,
|
|
963347
|
-
.patch_version =
|
|
963347
|
+
.patch_version = 6,
|
|
963348
963348
|
},
|
|
963349
963349
|
};
|
|
963350
963350
|
return &language;
|
package/expr/grammar.js
CHANGED
|
@@ -173,7 +173,7 @@ module.exports = grammar({
|
|
|
173
173
|
seq(
|
|
174
174
|
$.keyword_pound_pound_class,
|
|
175
175
|
alias(token.immediate('('), $.bracket),
|
|
176
|
-
alias($.
|
|
176
|
+
alias($._quote_permitting_identifier, $.class_name),
|
|
177
177
|
alias(token.immediate(')'), $.bracket),
|
|
178
178
|
optional(
|
|
179
179
|
// Class cast syntax
|
|
@@ -1035,7 +1035,7 @@ module.exports = grammar({
|
|
|
1035
1035
|
json_null_literal: (_) => 'null',
|
|
1036
1036
|
identifier: (_) => /[%A-Za-z][A-Za-z0-9]*(?:\.[%A-Za-z0-9][A-Za-z0-9]*)*/,
|
|
1037
1037
|
_expression_list: ($) => commaSep1($.expression),
|
|
1038
|
-
|
|
1039
|
-
choice(/"((?:""|[^"])*)"/, $.identifier),
|
|
1038
|
+
_quote_permitting_identifier: ($) =>
|
|
1039
|
+
choice(alias(/"((?:""|[^"])*)"/, $.identifier), $.identifier),
|
|
1040
1040
|
},
|
|
1041
1041
|
});
|
package/expr/src/node-types.json
CHANGED
package/expr/src/parser.c
CHANGED
|
@@ -129,7 +129,7 @@ enum ts_symbol_identifiers {
|
|
|
129
129
|
anon_sym_false = 99,
|
|
130
130
|
sym_json_null_literal = 100,
|
|
131
131
|
sym_identifier = 101,
|
|
132
|
-
|
|
132
|
+
aux_sym__quote_permitting_identifier_token1 = 102,
|
|
133
133
|
sym_source_file = 103,
|
|
134
134
|
sym_expression = 104,
|
|
135
135
|
sym_expr_atom = 105,
|
|
@@ -210,7 +210,7 @@ enum ts_symbol_identifiers {
|
|
|
210
210
|
sym_json_array_literal = 180,
|
|
211
211
|
sym_json_boolean_literal = 181,
|
|
212
212
|
sym__expression_list = 182,
|
|
213
|
-
|
|
213
|
+
sym__quote_permitting_identifier = 183,
|
|
214
214
|
aux_sym_expression_repeat1 = 184,
|
|
215
215
|
aux_sym_dollarsf_repeat1 = 185,
|
|
216
216
|
aux_sym__method_arg_list_repeat1 = 186,
|
|
@@ -336,7 +336,7 @@ static const char * const ts_symbol_names[] = {
|
|
|
336
336
|
[anon_sym_false] = "false",
|
|
337
337
|
[sym_json_null_literal] = "json_null_literal",
|
|
338
338
|
[sym_identifier] = "identifier",
|
|
339
|
-
[
|
|
339
|
+
[aux_sym__quote_permitting_identifier_token1] = "identifier",
|
|
340
340
|
[sym_source_file] = "source_file",
|
|
341
341
|
[sym_expression] = "expression",
|
|
342
342
|
[sym_expr_atom] = "expr_atom",
|
|
@@ -417,7 +417,7 @@ static const char * const ts_symbol_names[] = {
|
|
|
417
417
|
[sym_json_array_literal] = "json_array_literal",
|
|
418
418
|
[sym_json_boolean_literal] = "json_boolean_literal",
|
|
419
419
|
[sym__expression_list] = "_expression_list",
|
|
420
|
-
[
|
|
420
|
+
[sym__quote_permitting_identifier] = "class_name",
|
|
421
421
|
[aux_sym_expression_repeat1] = "expression_repeat1",
|
|
422
422
|
[aux_sym_dollarsf_repeat1] = "dollarsf_repeat1",
|
|
423
423
|
[aux_sym__method_arg_list_repeat1] = "_method_arg_list_repeat1",
|
|
@@ -543,7 +543,7 @@ static const TSSymbol ts_symbol_map[] = {
|
|
|
543
543
|
[anon_sym_false] = anon_sym_false,
|
|
544
544
|
[sym_json_null_literal] = sym_json_null_literal,
|
|
545
545
|
[sym_identifier] = sym_identifier,
|
|
546
|
-
[
|
|
546
|
+
[aux_sym__quote_permitting_identifier_token1] = sym_identifier,
|
|
547
547
|
[sym_source_file] = sym_source_file,
|
|
548
548
|
[sym_expression] = sym_expression,
|
|
549
549
|
[sym_expr_atom] = sym_expr_atom,
|
|
@@ -624,7 +624,7 @@ static const TSSymbol ts_symbol_map[] = {
|
|
|
624
624
|
[sym_json_array_literal] = sym_json_array_literal,
|
|
625
625
|
[sym_json_boolean_literal] = sym_json_boolean_literal,
|
|
626
626
|
[sym__expression_list] = sym__expression_list,
|
|
627
|
-
[
|
|
627
|
+
[sym__quote_permitting_identifier] = sym__quote_permitting_identifier,
|
|
628
628
|
[aux_sym_expression_repeat1] = aux_sym_expression_repeat1,
|
|
629
629
|
[aux_sym_dollarsf_repeat1] = aux_sym_dollarsf_repeat1,
|
|
630
630
|
[aux_sym__method_arg_list_repeat1] = aux_sym__method_arg_list_repeat1,
|
|
@@ -1056,9 +1056,9 @@ static const TSSymbolMetadata ts_symbol_metadata[] = {
|
|
|
1056
1056
|
.visible = true,
|
|
1057
1057
|
.named = true,
|
|
1058
1058
|
},
|
|
1059
|
-
[
|
|
1060
|
-
.visible =
|
|
1061
|
-
.named =
|
|
1059
|
+
[aux_sym__quote_permitting_identifier_token1] = {
|
|
1060
|
+
.visible = true,
|
|
1061
|
+
.named = true,
|
|
1062
1062
|
},
|
|
1063
1063
|
[sym_source_file] = {
|
|
1064
1064
|
.visible = true,
|
|
@@ -1380,7 +1380,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = {
|
|
|
1380
1380
|
.visible = false,
|
|
1381
1381
|
.named = true,
|
|
1382
1382
|
},
|
|
1383
|
-
[
|
|
1383
|
+
[sym__quote_permitting_identifier] = {
|
|
1384
1384
|
.visible = true,
|
|
1385
1385
|
.named = true,
|
|
1386
1386
|
},
|
|
@@ -8643,7 +8643,7 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) {
|
|
|
8643
8643
|
('a' <= lookahead && lookahead <= 'z')) ADVANCE(1006);
|
|
8644
8644
|
END_STATE();
|
|
8645
8645
|
case 1007:
|
|
8646
|
-
ACCEPT_TOKEN(
|
|
8646
|
+
ACCEPT_TOKEN(aux_sym__quote_permitting_identifier_token1);
|
|
8647
8647
|
if (lookahead == '"') ADVANCE(19);
|
|
8648
8648
|
END_STATE();
|
|
8649
8649
|
default:
|
|
@@ -28531,10 +28531,10 @@ static const uint16_t ts_small_parse_table[] = {
|
|
|
28531
28531
|
aux_sym_json_array_literal_repeat1,
|
|
28532
28532
|
[13708] = 2,
|
|
28533
28533
|
STATE(683), 1,
|
|
28534
|
-
|
|
28534
|
+
sym__quote_permitting_identifier,
|
|
28535
28535
|
ACTIONS(1051), 2,
|
|
28536
28536
|
sym_identifier,
|
|
28537
|
-
|
|
28537
|
+
aux_sym__quote_permitting_identifier_token1,
|
|
28538
28538
|
[13716] = 2,
|
|
28539
28539
|
ACTIONS(1053), 1,
|
|
28540
28540
|
anon_sym_DOT,
|
|
@@ -30754,7 +30754,7 @@ static const TSParseActionEntry ts_parse_actions[] = {
|
|
|
30754
30754
|
[1289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(268),
|
|
30755
30755
|
[1291] = {.entry = {.count = 1, .reusable = true}}, SHIFT(188),
|
|
30756
30756
|
[1293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(404),
|
|
30757
|
-
[1295] = {.entry = {.count = 1, .reusable = true}}, REDUCE(
|
|
30757
|
+
[1295] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__quote_permitting_identifier, 1, 0, 0),
|
|
30758
30758
|
[1297] = {.entry = {.count = 1, .reusable = true}}, SHIFT(712),
|
|
30759
30759
|
[1299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(709),
|
|
30760
30760
|
[1301] = {.entry = {.count = 1, .reusable = true}}, SHIFT(713),
|
|
@@ -30829,7 +30829,7 @@ TS_PUBLIC const TSLanguage *tree_sitter_objectscript_expr(void) {
|
|
|
30829
30829
|
.metadata = {
|
|
30830
30830
|
.major_version = 1,
|
|
30831
30831
|
.minor_version = 9,
|
|
30832
|
-
.patch_version =
|
|
30832
|
+
.patch_version = 6,
|
|
30833
30833
|
},
|
|
30834
30834
|
};
|
|
30835
30835
|
return &language;
|
|
@@ -3236,7 +3236,7 @@
|
|
|
3236
3236
|
"fields": {},
|
|
3237
3237
|
"children": {
|
|
3238
3238
|
"multiple": false,
|
|
3239
|
-
"required":
|
|
3239
|
+
"required": true,
|
|
3240
3240
|
"types": [
|
|
3241
3241
|
{
|
|
3242
3242
|
"type": "identifier",
|
|
@@ -3508,7 +3508,7 @@
|
|
|
3508
3508
|
"fields": {},
|
|
3509
3509
|
"children": {
|
|
3510
3510
|
"multiple": false,
|
|
3511
|
-
"required":
|
|
3511
|
+
"required": true,
|
|
3512
3512
|
"types": [
|
|
3513
3513
|
{
|
|
3514
3514
|
"type": "identifier",
|
|
@@ -3545,11 +3545,11 @@
|
|
|
3545
3545
|
"named": true
|
|
3546
3546
|
},
|
|
3547
3547
|
{
|
|
3548
|
-
"type": "
|
|
3548
|
+
"type": "identifier",
|
|
3549
3549
|
"named": true
|
|
3550
3550
|
},
|
|
3551
3551
|
{
|
|
3552
|
-
"type": "
|
|
3552
|
+
"type": "index_property_type",
|
|
3553
3553
|
"named": true
|
|
3554
3554
|
}
|
|
3555
3555
|
]
|
|
@@ -4854,7 +4854,7 @@
|
|
|
4854
4854
|
"fields": {},
|
|
4855
4855
|
"children": {
|
|
4856
4856
|
"multiple": false,
|
|
4857
|
-
"required":
|
|
4857
|
+
"required": true,
|
|
4858
4858
|
"types": [
|
|
4859
4859
|
{
|
|
4860
4860
|
"type": "identifier",
|
|
@@ -5450,7 +5450,7 @@
|
|
|
5450
5450
|
"fields": {},
|
|
5451
5451
|
"children": {
|
|
5452
5452
|
"multiple": false,
|
|
5453
|
-
"required":
|
|
5453
|
+
"required": true,
|
|
5454
5454
|
"types": [
|
|
5455
5455
|
{
|
|
5456
5456
|
"type": "identifier",
|
|
@@ -5690,21 +5690,6 @@
|
|
|
5690
5690
|
]
|
|
5691
5691
|
}
|
|
5692
5692
|
},
|
|
5693
|
-
{
|
|
5694
|
-
"type": "quote_permitting_identifier",
|
|
5695
|
-
"named": true,
|
|
5696
|
-
"fields": {},
|
|
5697
|
-
"children": {
|
|
5698
|
-
"multiple": false,
|
|
5699
|
-
"required": false,
|
|
5700
|
-
"types": [
|
|
5701
|
-
{
|
|
5702
|
-
"type": "identifier",
|
|
5703
|
-
"named": true
|
|
5704
|
-
}
|
|
5705
|
-
]
|
|
5706
|
-
}
|
|
5707
|
-
},
|
|
5708
5693
|
{
|
|
5709
5694
|
"type": "quoted_member_name",
|
|
5710
5695
|
"named": true,
|
|
@@ -5842,7 +5827,7 @@
|
|
|
5842
5827
|
"fields": {},
|
|
5843
5828
|
"children": {
|
|
5844
5829
|
"multiple": false,
|
|
5845
|
-
"required":
|
|
5830
|
+
"required": true,
|
|
5846
5831
|
"types": [
|
|
5847
5832
|
{
|
|
5848
5833
|
"type": "identifier",
|
|
@@ -6779,7 +6764,7 @@
|
|
|
6779
6764
|
"fields": {},
|
|
6780
6765
|
"children": {
|
|
6781
6766
|
"multiple": false,
|
|
6782
|
-
"required":
|
|
6767
|
+
"required": true,
|
|
6783
6768
|
"types": [
|
|
6784
6769
|
{
|
|
6785
6770
|
"type": "identifier",
|
|
@@ -7181,7 +7166,7 @@
|
|
|
7181
7166
|
"fields": {},
|
|
7182
7167
|
"children": {
|
|
7183
7168
|
"multiple": false,
|
|
7184
|
-
"required":
|
|
7169
|
+
"required": true,
|
|
7185
7170
|
"types": [
|
|
7186
7171
|
{
|
|
7187
7172
|
"type": "identifier",
|