@sshadows/tree-sitter-al 3.2.0 → 3.2.1
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/package.json +3 -4
- package/queries/folds.scm +4 -16
- package/queries/highlights.scm +305 -97
- package/queries/indents.scm +5 -5
- package/queries/locals.scm +28 -7
- package/queries/tags.scm +179 -68
- package/queries/textobjects.scm +67 -27
- package/src/parser.c +370 -356
- package/src/tree_sitter/array.h +23 -17
- package/tree-sitter-al.wasm +0 -0
- package/queries/bad_delete.scm.v1 +0 -30
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sshadows/tree-sitter-al",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "AL for Business Central",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,14 +24,13 @@
|
|
|
24
24
|
"binding.gyp",
|
|
25
25
|
"prebuilds/**",
|
|
26
26
|
"bindings/node/*",
|
|
27
|
-
"queries
|
|
27
|
+
"queries/*.scm",
|
|
28
28
|
"src/**",
|
|
29
29
|
"*.wasm"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"node-addon-api": "^8.7.0",
|
|
33
|
-
"node-gyp-build": "^4.8.4"
|
|
34
|
-
"ts-check": "^0.2.4"
|
|
33
|
+
"node-gyp-build": "^4.8.4"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
36
|
"@types/jquery": "^4.0.0",
|
package/queries/folds.scm
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
; AL Language (v2) - Tree-sitter Code Folding Queries
|
|
2
2
|
; Defines regions that can be collapsed in editors supporting tree-sitter folding
|
|
3
|
-
|
|
4
3
|
; =============================================================================
|
|
5
4
|
; Object Declarations
|
|
6
5
|
; =============================================================================
|
|
7
|
-
|
|
8
6
|
[
|
|
9
7
|
(table_declaration)
|
|
10
8
|
(tableextension_declaration)
|
|
@@ -31,23 +29,24 @@
|
|
|
31
29
|
; =============================================================================
|
|
32
30
|
; Procedures and Triggers
|
|
33
31
|
; =============================================================================
|
|
34
|
-
|
|
35
32
|
(procedure) @fold
|
|
33
|
+
|
|
36
34
|
(trigger_declaration) @fold
|
|
35
|
+
|
|
37
36
|
(event_declaration) @fold
|
|
37
|
+
|
|
38
38
|
(interface_procedure) @fold
|
|
39
|
+
|
|
39
40
|
(preproc_split_procedure) @fold
|
|
40
41
|
|
|
41
42
|
; =============================================================================
|
|
42
43
|
; Code Blocks (begin ... end)
|
|
43
44
|
; =============================================================================
|
|
44
|
-
|
|
45
45
|
(code_block) @fold
|
|
46
46
|
|
|
47
47
|
; =============================================================================
|
|
48
48
|
; Sections
|
|
49
49
|
; =============================================================================
|
|
50
|
-
|
|
51
50
|
[
|
|
52
51
|
(fields_section)
|
|
53
52
|
(keys_section)
|
|
@@ -66,7 +65,6 @@
|
|
|
66
65
|
; =============================================================================
|
|
67
66
|
; Layout Elements
|
|
68
67
|
; =============================================================================
|
|
69
|
-
|
|
70
68
|
[
|
|
71
69
|
(area_section)
|
|
72
70
|
(group_section)
|
|
@@ -82,7 +80,6 @@
|
|
|
82
80
|
; =============================================================================
|
|
83
81
|
; Action Sections
|
|
84
82
|
; =============================================================================
|
|
85
|
-
|
|
86
83
|
[
|
|
87
84
|
(action_area_section)
|
|
88
85
|
(action_group_section)
|
|
@@ -95,7 +92,6 @@
|
|
|
95
92
|
; =============================================================================
|
|
96
93
|
; Report Elements
|
|
97
94
|
; =============================================================================
|
|
98
|
-
|
|
99
95
|
[
|
|
100
96
|
(report_dataitem)
|
|
101
97
|
(report_column)
|
|
@@ -106,7 +102,6 @@
|
|
|
106
102
|
; =============================================================================
|
|
107
103
|
; Query Elements
|
|
108
104
|
; =============================================================================
|
|
109
|
-
|
|
110
105
|
[
|
|
111
106
|
(query_dataitem)
|
|
112
107
|
(query_column)
|
|
@@ -116,7 +111,6 @@
|
|
|
116
111
|
; =============================================================================
|
|
117
112
|
; XMLport Elements
|
|
118
113
|
; =============================================================================
|
|
119
|
-
|
|
120
114
|
[
|
|
121
115
|
(xmlport_element)
|
|
122
116
|
(xmlport_attribute)
|
|
@@ -125,7 +119,6 @@
|
|
|
125
119
|
; =============================================================================
|
|
126
120
|
; Declarations with Bodies
|
|
127
121
|
; =============================================================================
|
|
128
|
-
|
|
129
122
|
[
|
|
130
123
|
(field_declaration)
|
|
131
124
|
(enum_value_declaration)
|
|
@@ -137,13 +130,11 @@
|
|
|
137
130
|
; =============================================================================
|
|
138
131
|
; Var Sections
|
|
139
132
|
; =============================================================================
|
|
140
|
-
|
|
141
133
|
(var_section) @fold
|
|
142
134
|
|
|
143
135
|
; =============================================================================
|
|
144
136
|
; Control Flow
|
|
145
137
|
; =============================================================================
|
|
146
|
-
|
|
147
138
|
[
|
|
148
139
|
(if_statement)
|
|
149
140
|
(case_statement)
|
|
@@ -159,7 +150,6 @@
|
|
|
159
150
|
; =============================================================================
|
|
160
151
|
; Modification Blocks
|
|
161
152
|
; =============================================================================
|
|
162
|
-
|
|
163
153
|
[
|
|
164
154
|
(addafter_modification)
|
|
165
155
|
(addbefore_modification)
|
|
@@ -191,13 +181,11 @@
|
|
|
191
181
|
; =============================================================================
|
|
192
182
|
; Comments
|
|
193
183
|
; =============================================================================
|
|
194
|
-
|
|
195
184
|
(multiline_comment) @fold
|
|
196
185
|
|
|
197
186
|
; =============================================================================
|
|
198
187
|
; Preprocessor Regions
|
|
199
188
|
; =============================================================================
|
|
200
|
-
|
|
201
189
|
(preproc_region) @fold
|
|
202
190
|
|
|
203
191
|
; Preprocessor conditionals
|