tree-sitter-objectscript 1.9.11 → 1.9.12
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/grammar.js +1 -1
- package/core/queries/highlights.scm +5 -1
- package/core/src/node-types.json +0 -12
- package/core/src/parser.c +15162 -15251
- package/core/src/tree_sitter/array.h +23 -17
- package/expr/src/parser.c +3211 -3210
- package/expr/src/tree_sitter/array.h +23 -17
- package/objectscript/src/node-types.json +0 -12
- package/objectscript/src/parser.c +10854 -10932
- package/objectscript/src/tree_sitter/array.h +23 -17
- package/objectscript_routine/queries/highlights.scm +5 -1
- package/objectscript_routine/src/node-types.json +0 -12
- package/objectscript_routine/src/parser.c +7695 -7775
- package/objectscript_routine/src/tree_sitter/array.h +23 -17
- package/package.json +2 -2
- 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/queries/highlights.scm +5 -1
- package/udl/src/node-types.json +0 -12
- package/udl/src/parser.c +10373 -10450
- package/udl/src/tree_sitter/array.h +23 -17
|
@@ -50,12 +50,18 @@ extern "C" {
|
|
|
50
50
|
/// memory allocated for the array's contents.
|
|
51
51
|
#define array_clear(self) ((self)->size = 0)
|
|
52
52
|
|
|
53
|
+
#ifdef __cplusplus
|
|
54
|
+
#define _array__cast(self, expr) (decltype((self)->contents))(expr)
|
|
55
|
+
#else
|
|
56
|
+
#define _array__cast(self, expr) (expr)
|
|
57
|
+
#endif
|
|
58
|
+
|
|
53
59
|
/// Reserve `new_capacity` elements of space in the array. If `new_capacity` is
|
|
54
60
|
/// less than the array's current capacity, this function has no effect.
|
|
55
|
-
#define array_reserve(self, new_capacity)
|
|
56
|
-
((self)->contents = _array__reserve(
|
|
57
|
-
(void *)(self)->contents, &(self)->capacity,
|
|
58
|
-
array_elem_size(self), new_capacity)
|
|
61
|
+
#define array_reserve(self, new_capacity) \
|
|
62
|
+
((self)->contents = _array__cast(self, _array__reserve( \
|
|
63
|
+
(void *)(self)->contents, &(self)->capacity, \
|
|
64
|
+
array_elem_size(self), new_capacity)) \
|
|
59
65
|
)
|
|
60
66
|
|
|
61
67
|
/// Free any memory allocated for this array. Note that this does not free any
|
|
@@ -71,10 +77,10 @@ extern "C" {
|
|
|
71
77
|
/// Push a new `element` onto the end of the array.
|
|
72
78
|
#define array_push(self, element) \
|
|
73
79
|
do { \
|
|
74
|
-
(self)->contents = _array__grow(
|
|
80
|
+
(self)->contents = _array__cast(self, _array__grow( \
|
|
75
81
|
(void *)(self)->contents, (self)->size, &(self)->capacity, \
|
|
76
82
|
1, array_elem_size(self) \
|
|
77
|
-
);
|
|
83
|
+
)); \
|
|
78
84
|
(self)->contents[(self)->size++] = (element); \
|
|
79
85
|
} while(0)
|
|
80
86
|
|
|
@@ -83,10 +89,10 @@ extern "C" {
|
|
|
83
89
|
#define array_grow_by(self, count) \
|
|
84
90
|
do { \
|
|
85
91
|
if ((count) == 0) break; \
|
|
86
|
-
(self)->contents = _array__grow(
|
|
92
|
+
(self)->contents = _array__cast(self, _array__grow( \
|
|
87
93
|
(self)->contents, (self)->size, &(self)->capacity, \
|
|
88
94
|
count, array_elem_size(self) \
|
|
89
|
-
);
|
|
95
|
+
)); \
|
|
90
96
|
memset((self)->contents + (self)->size, 0, (count) * array_elem_size(self)); \
|
|
91
97
|
(self)->size += (count); \
|
|
92
98
|
} while (0)
|
|
@@ -98,26 +104,26 @@ extern "C" {
|
|
|
98
104
|
/// Append `count` elements to the end of the array, reading their values from the
|
|
99
105
|
/// `contents` pointer.
|
|
100
106
|
#define array_extend(self, count, other_contents) \
|
|
101
|
-
(self)->contents = _array__splice(
|
|
107
|
+
((self)->contents = _array__cast(self, _array__splice( \
|
|
102
108
|
(void*)(self)->contents, &(self)->size, &(self)->capacity, \
|
|
103
109
|
array_elem_size(self), (self)->size, 0, count, other_contents \
|
|
104
|
-
)
|
|
110
|
+
)))
|
|
105
111
|
|
|
106
112
|
/// Remove `old_count` elements from the array starting at the given `index`. At
|
|
107
113
|
/// the same index, insert `new_count` new elements, reading their values from the
|
|
108
114
|
/// `new_contents` pointer.
|
|
109
115
|
#define array_splice(self, _index, old_count, new_count, new_contents) \
|
|
110
|
-
(self)->contents = _array__splice(
|
|
116
|
+
((self)->contents = _array__cast(self, _array__splice( \
|
|
111
117
|
(void *)(self)->contents, &(self)->size, &(self)->capacity, \
|
|
112
118
|
array_elem_size(self), _index, old_count, new_count, new_contents \
|
|
113
|
-
)
|
|
119
|
+
)))
|
|
114
120
|
|
|
115
121
|
/// Insert one `element` into the array at the given `index`.
|
|
116
122
|
#define array_insert(self, _index, element) \
|
|
117
|
-
(self)->contents = _array__splice(
|
|
123
|
+
((self)->contents = _array__cast(self, _array__splice( \
|
|
118
124
|
(void *)(self)->contents, &(self)->size, &(self)->capacity, \
|
|
119
125
|
array_elem_size(self), _index, 0, 1, &(element) \
|
|
120
|
-
)
|
|
126
|
+
)))
|
|
121
127
|
|
|
122
128
|
/// Remove one element from the array at the given `index`.
|
|
123
129
|
#define array_erase(self, _index) \
|
|
@@ -128,17 +134,17 @@ extern "C" {
|
|
|
128
134
|
|
|
129
135
|
/// Assign the contents of one array to another, reallocating if necessary.
|
|
130
136
|
#define array_assign(self, other) \
|
|
131
|
-
(self)->contents = _array__assign(
|
|
137
|
+
((self)->contents = _array__cast(self, _array__assign( \
|
|
132
138
|
(void *)(self)->contents, &(self)->size, &(self)->capacity, \
|
|
133
139
|
(const void *)(other)->contents, (other)->size, array_elem_size(self) \
|
|
134
|
-
)
|
|
140
|
+
)))
|
|
135
141
|
|
|
136
142
|
/// Swap one array with another
|
|
137
143
|
#define array_swap(self, other) \
|
|
138
144
|
do { \
|
|
139
145
|
void *_array_swap_tmp = (void *)(self)->contents; \
|
|
140
146
|
(self)->contents = (other)->contents; \
|
|
141
|
-
(other)->contents = _array_swap_tmp;
|
|
147
|
+
(other)->contents = _array__cast(other, _array_swap_tmp); \
|
|
142
148
|
_array__swap(&(self)->size, &(self)->capacity, \
|
|
143
149
|
&(other)->size, &(other)->capacity); \
|
|
144
150
|
} while (0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tree-sitter-objectscript",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.12",
|
|
4
4
|
"description": "Tree Sitter Grammar for InterSystems ObjectScript",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"install": "node-gyp-build",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"node-gyp": "^12.1.0",
|
|
37
37
|
"prebuildify": "^6.0.1",
|
|
38
38
|
"tree-sitter": "^0.25.0",
|
|
39
|
-
"tree-sitter-cli": "0.26.
|
|
39
|
+
"tree-sitter-cli": "^0.26.11"
|
|
40
40
|
},
|
|
41
41
|
"main": "bindings/node",
|
|
42
42
|
"types": "bindings/node",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/tree-sitter.json
CHANGED
package/udl/src/node-types.json
CHANGED
|
@@ -1974,10 +1974,6 @@
|
|
|
1974
1974
|
"type": "macro",
|
|
1975
1975
|
"named": true
|
|
1976
1976
|
},
|
|
1977
|
-
{
|
|
1978
|
-
"type": "method_dot",
|
|
1979
|
-
"named": true
|
|
1980
|
-
},
|
|
1981
1977
|
{
|
|
1982
1978
|
"type": "oref_chain_segment",
|
|
1983
1979
|
"named": true
|
|
@@ -3283,10 +3279,6 @@
|
|
|
3283
3279
|
"type": "macro",
|
|
3284
3280
|
"named": true
|
|
3285
3281
|
},
|
|
3286
|
-
{
|
|
3287
|
-
"type": "method_dot",
|
|
3288
|
-
"named": true
|
|
3289
|
-
},
|
|
3290
3282
|
{
|
|
3291
3283
|
"type": "oref_chain_segment",
|
|
3292
3284
|
"named": true
|
|
@@ -7478,10 +7470,6 @@
|
|
|
7478
7470
|
"type": "macro_value_line_with_continue",
|
|
7479
7471
|
"named": true
|
|
7480
7472
|
},
|
|
7481
|
-
{
|
|
7482
|
-
"type": "method_dot",
|
|
7483
|
-
"named": true
|
|
7484
|
-
},
|
|
7485
7473
|
{
|
|
7486
7474
|
"type": "mnemonic",
|
|
7487
7475
|
"named": true
|