@abaplint/core 2.97.13 → 2.97.14
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/build/src/abap/2_statements/statements/message.js +3 -1
- package/build/src/abap/5_syntax/_builtin.js +151 -63
- package/build/src/abap/5_syntax/_type_utils.js +16 -4
- package/build/src/abap/5_syntax/basic_types.js +15 -2
- package/build/src/abap/5_syntax/expressions/attribute_name.js +2 -1
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
|
@@ -17,7 +17,9 @@ class Message {
|
|
|
17
17
|
const mwith = (0, combi_1.seq)("WITH", s, (0, combi_1.opt)(sourc));
|
|
18
18
|
const foo = (0, combi_1.seq)(expressions_1.MessageSource, (0, combi_1.opt)(options), (0, combi_1.opt)(mwith));
|
|
19
19
|
const text = (0, combi_1.seq)(s, type, (0, combi_1.optPrio)(like), (0, combi_1.optPrio)(raising));
|
|
20
|
-
const
|
|
20
|
+
const cloud1 = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.seq)("WITH", expressions_1.Source, (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)(expressions_1.Source))), (0, combi_1.altPrio)(into, raising));
|
|
21
|
+
const cloud2 = (0, combi_1.seq)((0, combi_1.altPrio)(into, raising), (0, combi_1.opt)((0, combi_1.seq)("WITH", expressions_1.Source, (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)(expressions_1.Source))));
|
|
22
|
+
const cloud = (0, combi_1.seq)(expressions_1.MessageSource, (0, combi_1.alt)(cloud1, cloud2));
|
|
21
23
|
const ret = (0, combi_1.seq)("MESSAGE", (0, combi_1.altPrio)((0, combi_1.verNot)(version_1.Version.Cloud, foo), (0, combi_1.verNot)(version_1.Version.Cloud, text), (0, combi_1.ver)(version_1.Version.Cloud, cloud)));
|
|
22
24
|
return ret;
|
|
23
25
|
}
|
|
@@ -157,75 +157,149 @@ class BuiltIn {
|
|
|
157
157
|
/////////////////////////////
|
|
158
158
|
buildSY() {
|
|
159
159
|
const components = [];
|
|
160
|
-
|
|
161
|
-
components.push({ name: "
|
|
162
|
-
components.push({ name: "
|
|
163
|
-
components.push({ name: "
|
|
164
|
-
components.push({ name: "
|
|
165
|
-
components.push({ name: "
|
|
166
|
-
components.push({ name: "
|
|
167
|
-
components.push({ name: "
|
|
168
|
-
components.push({ name: "
|
|
169
|
-
components.push({ name: "
|
|
170
|
-
components.push({ name: "
|
|
171
|
-
components.push({ name: "datlo", type: new basic_1.DateType() });
|
|
172
|
-
components.push({ name: "datum", type: new basic_1.DateType() });
|
|
173
|
-
components.push({ name: "dayst", type: new basic_1.CharacterType(1) });
|
|
160
|
+
// NOTE: fields must be in correct sequence for the syntax check
|
|
161
|
+
components.push({ name: "index", type: new basic_1.IntegerType() });
|
|
162
|
+
components.push({ name: "pagno", type: new basic_1.IntegerType() });
|
|
163
|
+
components.push({ name: "tabix", type: new basic_1.IntegerType() });
|
|
164
|
+
components.push({ name: "tfill", type: new basic_1.IntegerType() });
|
|
165
|
+
components.push({ name: "tlopc", type: new basic_1.IntegerType() });
|
|
166
|
+
components.push({ name: "tmaxl", type: new basic_1.IntegerType() });
|
|
167
|
+
components.push({ name: "toccu", type: new basic_1.IntegerType() });
|
|
168
|
+
components.push({ name: "ttabc", type: new basic_1.IntegerType() });
|
|
169
|
+
components.push({ name: "tstis", type: new basic_1.IntegerType() });
|
|
170
|
+
components.push({ name: "ttabi", type: new basic_1.IntegerType() });
|
|
174
171
|
components.push({ name: "dbcnt", type: new basic_1.IntegerType() });
|
|
175
|
-
components.push({ name: "dbnam", type: new basic_1.CharacterType(20, { qualifiedName: "sy-dbnam" }) });
|
|
176
|
-
components.push({ name: "dbsys", type: new basic_1.CharacterType(10, { qualifiedName: "sy-dbsys" }) });
|
|
177
|
-
components.push({ name: "dyngr", type: new basic_1.CharacterType(4, { qualifiedName: "sy-dyngr" }) });
|
|
178
|
-
components.push({ name: "dynnr", type: new basic_1.CharacterType(4, { qualifiedName: "sy-dynnr" }) });
|
|
179
|
-
components.push({ name: "fdayw", type: new basic_1.IntegerType() });
|
|
180
172
|
components.push({ name: "fdpos", type: new basic_1.IntegerType() });
|
|
181
|
-
components.push({ name: "
|
|
182
|
-
components.push({ name: "folen", type: new basic_1.IntegerType() });
|
|
183
|
-
components.push({ name: "host", type: new basic_1.CharacterType(32, { qualifiedName: "sy-host" }) });
|
|
184
|
-
components.push({ name: "index", type: new basic_1.IntegerType() });
|
|
185
|
-
components.push({ name: "input", type: new basic_1.CharacterType(1, { qualifiedName: "sy-input" }) });
|
|
186
|
-
components.push({ name: "langu", type: new basic_1.CharacterType(1, { qualifiedName: "sy-langu", conversionExit: "ISOLA" }) });
|
|
187
|
-
components.push({ name: "ldbpg", type: new basic_1.CharacterType(40, { qualifiedName: "sy-ldbpg" }) });
|
|
188
|
-
components.push({ name: "lilli", type: new basic_1.IntegerType() });
|
|
173
|
+
components.push({ name: "colno", type: new basic_1.IntegerType() });
|
|
189
174
|
components.push({ name: "linct", type: new basic_1.IntegerType() });
|
|
190
175
|
components.push({ name: "linno", type: new basic_1.IntegerType() });
|
|
191
176
|
components.push({ name: "linsz", type: new basic_1.IntegerType() });
|
|
192
|
-
components.push({ name: "
|
|
193
|
-
components.push({ name: "listi", type: new basic_1.IntegerType() });
|
|
194
|
-
components.push({ name: "loopc", type: new basic_1.IntegerType() });
|
|
195
|
-
components.push({ name: "lsind", type: new basic_1.IntegerType() });
|
|
177
|
+
components.push({ name: "pagct", type: new basic_1.IntegerType() });
|
|
196
178
|
components.push({ name: "macol", type: new basic_1.IntegerType() });
|
|
197
|
-
components.push({ name: "mandt", type: new basic_1.CharacterType(3, { qualifiedName: "sy-mandt" }) });
|
|
198
179
|
components.push({ name: "marow", type: new basic_1.IntegerType() });
|
|
180
|
+
components.push({ name: "tleng", type: new basic_1.IntegerType() });
|
|
181
|
+
components.push({ name: "sfoff", type: new basic_1.IntegerType() });
|
|
182
|
+
components.push({ name: "willi", type: new basic_1.IntegerType() });
|
|
183
|
+
components.push({ name: "lilli", type: new basic_1.IntegerType() });
|
|
184
|
+
components.push({ name: "subrc", type: new basic_1.IntegerType() });
|
|
185
|
+
components.push({ name: "fleng", type: new basic_1.IntegerType() });
|
|
186
|
+
components.push({ name: "cucol", type: new basic_1.IntegerType() });
|
|
187
|
+
components.push({ name: "curow", type: new basic_1.IntegerType() });
|
|
188
|
+
components.push({ name: "lsind", type: new basic_1.IntegerType() });
|
|
189
|
+
components.push({ name: "listi", type: new basic_1.IntegerType() });
|
|
190
|
+
components.push({ name: "stepl", type: new basic_1.IntegerType() });
|
|
191
|
+
components.push({ name: "tpagi", type: new basic_1.IntegerType() });
|
|
192
|
+
components.push({ name: "winx1", type: new basic_1.IntegerType() });
|
|
193
|
+
components.push({ name: "winy1", type: new basic_1.IntegerType() });
|
|
194
|
+
components.push({ name: "winx2", type: new basic_1.IntegerType() });
|
|
195
|
+
components.push({ name: "winy2", type: new basic_1.IntegerType() });
|
|
196
|
+
components.push({ name: "winco", type: new basic_1.IntegerType() });
|
|
197
|
+
components.push({ name: "winro", type: new basic_1.IntegerType() });
|
|
198
|
+
components.push({ name: "windi", type: new basic_1.IntegerType() });
|
|
199
|
+
components.push({ name: "srows", type: new basic_1.IntegerType() });
|
|
200
|
+
components.push({ name: "scols", type: new basic_1.IntegerType() });
|
|
201
|
+
components.push({ name: "loopc", type: new basic_1.IntegerType() });
|
|
202
|
+
components.push({ name: "folen", type: new basic_1.IntegerType() });
|
|
203
|
+
components.push({ name: "fodec", type: new basic_1.IntegerType() });
|
|
204
|
+
components.push({ name: "tzone", type: new basic_1.IntegerType() });
|
|
205
|
+
components.push({ name: "dayst", type: new basic_1.CharacterType(1) });
|
|
206
|
+
components.push({ name: "ftype", type: new basic_1.CharacterType(1) });
|
|
207
|
+
components.push({ name: "appli", type: new basic_1.HexType(2) });
|
|
208
|
+
components.push({ name: "fdayw", type: new basic_1.AnyType() });
|
|
209
|
+
components.push({ name: "ccurs", type: new basic_1.PackedType(5, 0) });
|
|
210
|
+
components.push({ name: "ccurt", type: new basic_1.PackedType(5, 0) });
|
|
211
|
+
components.push({ name: "debug", type: new basic_1.CharacterType(1) });
|
|
212
|
+
components.push({ name: "ctype", type: new basic_1.CharacterType(1) });
|
|
213
|
+
components.push({ name: "input", type: new basic_1.CharacterType(1, { qualifiedName: "sy-input" }) });
|
|
214
|
+
components.push({ name: "langu", type: new basic_1.CharacterType(1, { qualifiedName: "sy-langu", conversionExit: "ISOLA" }) });
|
|
199
215
|
components.push({ name: "modno", type: new basic_1.IntegerType() });
|
|
200
|
-
components.push({ name: "
|
|
201
|
-
components.push({ name: "
|
|
202
|
-
components.push({ name: "
|
|
203
|
-
components.push({ name: "
|
|
204
|
-
components.push({ name: "
|
|
205
|
-
components.push({ name: "
|
|
206
|
-
components.push({ name: "
|
|
207
|
-
components.push({ name: "
|
|
208
|
-
components.push({ name: "
|
|
209
|
-
components.push({ name: "
|
|
216
|
+
components.push({ name: "batch", type: new basic_1.CharacterType(1, { qualifiedName: "sy-batch" }) });
|
|
217
|
+
components.push({ name: "binpt", type: new basic_1.CharacterType(1, { qualifiedName: "sy-binpt" }) });
|
|
218
|
+
components.push({ name: "calld", type: new basic_1.CharacterType(1, { qualifiedName: "sy-calld" }) });
|
|
219
|
+
components.push({ name: "dynnr", type: new basic_1.CharacterType(4, { qualifiedName: "sy-dynnr" }) });
|
|
220
|
+
components.push({ name: "dyngr", type: new basic_1.CharacterType(4, { qualifiedName: "sy-dyngr" }) });
|
|
221
|
+
components.push({ name: "newpa", type: new basic_1.CharacterType(1) });
|
|
222
|
+
components.push({ name: "pri40", type: new basic_1.CharacterType(1) });
|
|
223
|
+
components.push({ name: "rstrt", type: new basic_1.CharacterType(1) });
|
|
224
|
+
components.push({ name: "wtitl", type: new basic_1.CharacterType(1, { qualifiedName: "sy-wtitl" }) });
|
|
225
|
+
components.push({ name: "cpage", type: new basic_1.IntegerType() });
|
|
226
|
+
components.push({ name: "dbnam", type: new basic_1.CharacterType(20, { qualifiedName: "sy-dbnam" }) });
|
|
227
|
+
components.push({ name: "mandt", type: new basic_1.CharacterType(3, { qualifiedName: "sy-mandt" }) });
|
|
228
|
+
components.push({ name: "prefx", type: new basic_1.CharacterType(3) });
|
|
229
|
+
components.push({ name: "fmkey", type: new basic_1.CharacterType(3) });
|
|
230
|
+
components.push({ name: "pexpi", type: new basic_1.NumericType(1) });
|
|
231
|
+
components.push({ name: "prini", type: new basic_1.NumericType(1) });
|
|
232
|
+
components.push({ name: "primm", type: new basic_1.CharacterType(1) });
|
|
233
|
+
components.push({ name: "prrel", type: new basic_1.CharacterType(1) });
|
|
234
|
+
components.push({ name: "playo", type: new basic_1.CharacterType(5) });
|
|
235
|
+
components.push({ name: "prbig", type: new basic_1.CharacterType(1) });
|
|
236
|
+
components.push({ name: "playp", type: new basic_1.CharacterType(1) });
|
|
237
|
+
components.push({ name: "prnew", type: new basic_1.CharacterType(1) });
|
|
238
|
+
components.push({ name: "prlog", type: new basic_1.CharacterType(1) });
|
|
210
239
|
components.push({ name: "pdest", type: new basic_1.CharacterType(4, { qualifiedName: "sy-pdest" }) });
|
|
240
|
+
components.push({ name: "plist", type: new basic_1.CharacterType(12) });
|
|
241
|
+
components.push({ name: "pauth", type: new basic_1.NumericType(2) });
|
|
242
|
+
components.push({ name: "prdsn", type: new basic_1.CharacterType(6) });
|
|
243
|
+
components.push({ name: "pnwpa", type: new basic_1.CharacterType(1) });
|
|
244
|
+
components.push({ name: "callr", type: new basic_1.CharacterType(8, { qualifiedName: "sy-callr" }) });
|
|
245
|
+
components.push({ name: "repi2", type: new basic_1.CharacterType(40) });
|
|
246
|
+
components.push({ name: "rtitl", type: new basic_1.CharacterType(70) });
|
|
247
|
+
components.push({ name: "prrec", type: new basic_1.CharacterType(12) });
|
|
248
|
+
components.push({ name: "prtxt", type: new basic_1.CharacterType(68) });
|
|
249
|
+
components.push({ name: "prabt", type: new basic_1.CharacterType(12) });
|
|
250
|
+
components.push({ name: "lpass", type: new basic_1.CharacterType(4) });
|
|
251
|
+
components.push({ name: "nrpag", type: new basic_1.CharacterType(1) });
|
|
252
|
+
components.push({ name: "paart", type: new basic_1.CharacterType(16) });
|
|
253
|
+
components.push({ name: "prcop", type: new basic_1.NumericType(3) });
|
|
254
|
+
components.push({ name: "batzs", type: new basic_1.CharacterType(1) });
|
|
255
|
+
components.push({ name: "bspld", type: new basic_1.CharacterType(1) });
|
|
256
|
+
components.push({ name: "brep4", type: new basic_1.CharacterType(4) });
|
|
257
|
+
components.push({ name: "batzo", type: new basic_1.CharacterType(1) });
|
|
258
|
+
components.push({ name: "batzd", type: new basic_1.CharacterType(1) });
|
|
259
|
+
components.push({ name: "batzw", type: new basic_1.CharacterType(1) });
|
|
260
|
+
components.push({ name: "batzm", type: new basic_1.CharacterType(1) });
|
|
261
|
+
components.push({ name: "ctabl", type: new basic_1.CharacterType(4) });
|
|
262
|
+
components.push({ name: "dbsys", type: new basic_1.CharacterType(10, { qualifiedName: "sy-dbsys" }) });
|
|
263
|
+
components.push({ name: "dcsys", type: new basic_1.CharacterType(4) });
|
|
264
|
+
components.push({ name: "macdb", type: new basic_1.CharacterType(4) });
|
|
265
|
+
components.push({ name: "sysid", type: new basic_1.CharacterType(8, { qualifiedName: "sy-sysid" }) });
|
|
266
|
+
components.push({ name: "opsys", type: new basic_1.CharacterType(10, { qualifiedName: "sy-opsys" }) });
|
|
211
267
|
components.push({ name: "pfkey", type: new basic_1.CharacterType(20, { qualifiedName: "sy-pfkey" }) });
|
|
212
|
-
components.push({ name: "repid", type: new basic_1.CharacterType(40, { qualifiedName: "sy-repid" }) });
|
|
213
268
|
components.push({ name: "saprl", type: new basic_1.CharacterType(4, { qualifiedName: "sy-saprl" }) });
|
|
214
|
-
components.push({ name: "scols", type: new basic_1.IntegerType() });
|
|
215
|
-
components.push({ name: "slset", type: new basic_1.CharacterType(14, { qualifiedName: "sy-slset" }) });
|
|
216
|
-
components.push({ name: "spono", type: new basic_1.CharacterType(10, { qualifiedName: "sy-spono" }) });
|
|
217
|
-
components.push({ name: "srows", type: new basic_1.IntegerType() });
|
|
218
|
-
components.push({ name: "staco", type: new basic_1.IntegerType() });
|
|
219
|
-
components.push({ name: "staro", type: new basic_1.IntegerType() });
|
|
220
|
-
components.push({ name: "stepl", type: new basic_1.IntegerType() });
|
|
221
|
-
components.push({ name: "subrc", type: new basic_1.IntegerType() });
|
|
222
|
-
components.push({ name: "sysid", type: new basic_1.CharacterType(3, { qualifiedName: "sy-sysid" }) });
|
|
223
|
-
components.push({ name: "tabix", type: new basic_1.IntegerType() });
|
|
224
269
|
components.push({ name: "tcode", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tcode" }) });
|
|
225
|
-
components.push({ name: "
|
|
226
|
-
components.push({ name: "
|
|
270
|
+
components.push({ name: "ucomm", type: new basic_1.CharacterType(70, { qualifiedName: "sy-ucomm" }) });
|
|
271
|
+
components.push({ name: "cfwae", type: new basic_1.CharacterType(5) });
|
|
272
|
+
components.push({ name: "chwae", type: new basic_1.CharacterType(5) });
|
|
273
|
+
components.push({ name: "spono", type: new basic_1.CharacterType(10, { qualifiedName: "sy-spono" }) });
|
|
274
|
+
components.push({ name: "sponr", type: new basic_1.NumericType(10) });
|
|
275
|
+
components.push({ name: "waers", type: new basic_1.CharacterType(5) });
|
|
276
|
+
components.push({ name: "cdate", type: new basic_1.DateType() });
|
|
277
|
+
components.push({ name: "datum", type: new basic_1.DateType() });
|
|
278
|
+
components.push({ name: "slset", type: new basic_1.CharacterType(14, { qualifiedName: "sy-slset" }) });
|
|
279
|
+
components.push({ name: "subty", type: new basic_1.HexType(1) });
|
|
280
|
+
components.push({ name: "subcs", type: new basic_1.CharacterType(1) });
|
|
281
|
+
components.push({ name: "group", type: new basic_1.CharacterType(1) });
|
|
282
|
+
components.push({ name: "ffile", type: new basic_1.CharacterType(8) });
|
|
283
|
+
components.push({ name: "uzeit", type: new basic_1.TimeType() });
|
|
284
|
+
components.push({ name: "dsnam", type: new basic_1.CharacterType(8) });
|
|
285
|
+
components.push({ name: "tabid", type: new basic_1.CharacterType(8) });
|
|
286
|
+
components.push({ name: "tfdsn", type: new basic_1.CharacterType(8) });
|
|
287
|
+
components.push({ name: "uname", type: new basic_1.CharacterType(12, { qualifiedName: "sy-uname" }) });
|
|
288
|
+
components.push({ name: "lstat", type: new basic_1.CharacterType(16) });
|
|
289
|
+
components.push({ name: "abcde", type: new basic_1.CharacterType(26, { qualifiedName: "sy-abcde" }) });
|
|
290
|
+
components.push({ name: "marky", type: new basic_1.CharacterType(1) });
|
|
291
|
+
components.push({ name: "sfnam", type: new basic_1.CharacterType(30) });
|
|
292
|
+
components.push({ name: "tname", type: new basic_1.CharacterType(30) });
|
|
293
|
+
components.push({ name: "msgli", type: new basic_1.CharacterType(60, { qualifiedName: "sy-msgli" }) });
|
|
227
294
|
components.push({ name: "title", type: new basic_1.CharacterType(70, { qualifiedName: "sy-title" }) });
|
|
228
|
-
components.push({ name: "
|
|
295
|
+
components.push({ name: "entry", type: new basic_1.CharacterType(72) });
|
|
296
|
+
components.push({ name: "lisel", type: new basic_1.CharacterType(255, { qualifiedName: "sy-lisel" }) });
|
|
297
|
+
components.push({ name: "uline", type: new basic_1.CharacterType(255, { qualifiedName: "sy-uline" }) });
|
|
298
|
+
components.push({ name: "xcode", type: new basic_1.CharacterType(70) });
|
|
299
|
+
components.push({ name: "cprog", type: new basic_1.CharacterType(40, { qualifiedName: "sy-cprog" }) });
|
|
300
|
+
components.push({ name: "xprog", type: new basic_1.CharacterType(40) });
|
|
301
|
+
components.push({ name: "xform", type: new basic_1.CharacterType(30) });
|
|
302
|
+
components.push({ name: "ldbpg", type: new basic_1.CharacterType(40, { qualifiedName: "sy-ldbpg" }) });
|
|
229
303
|
components.push({ name: "tvar0", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar0" }) });
|
|
230
304
|
components.push({ name: "tvar1", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar1" }) });
|
|
231
305
|
components.push({ name: "tvar2", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar2" }) });
|
|
@@ -236,20 +310,34 @@ class BuiltIn {
|
|
|
236
310
|
components.push({ name: "tvar7", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar7" }) });
|
|
237
311
|
components.push({ name: "tvar8", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar8" }) });
|
|
238
312
|
components.push({ name: "tvar9", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar9" }) });
|
|
239
|
-
components.push({ name: "
|
|
240
|
-
components.push({ name: "
|
|
241
|
-
components.push({ name: "
|
|
242
|
-
components.push({ name: "
|
|
243
|
-
components.push({ name: "
|
|
313
|
+
components.push({ name: "msgid", type: new basic_1.CharacterType(20, { qualifiedName: "sy-msgid" }) });
|
|
314
|
+
components.push({ name: "msgty", type: new basic_1.CharacterType(1, { qualifiedName: "sy-msgty" }) });
|
|
315
|
+
components.push({ name: "msgno", type: new basic_1.NumericType(3, "sy-msgno") });
|
|
316
|
+
components.push({ name: "msgv1", type: new basic_1.CharacterType(50, { qualifiedName: "sy-msgv1" }) });
|
|
317
|
+
components.push({ name: "msgv2", type: new basic_1.CharacterType(50, { qualifiedName: "sy-msgv2" }) });
|
|
318
|
+
components.push({ name: "msgv3", type: new basic_1.CharacterType(50, { qualifiedName: "sy-msgv3" }) });
|
|
319
|
+
components.push({ name: "msgv4", type: new basic_1.CharacterType(50, { qualifiedName: "sy-msgv4" }) });
|
|
320
|
+
components.push({ name: "oncom", type: new basic_1.CharacterType(1) });
|
|
244
321
|
components.push({ name: "vline", type: new basic_1.CharacterType(1, { qualifiedName: "sy-vline" }) });
|
|
245
|
-
components.push({ name: "
|
|
322
|
+
components.push({ name: "winsl", type: new basic_1.CharacterType(79) });
|
|
323
|
+
components.push({ name: "staco", type: new basic_1.IntegerType() });
|
|
324
|
+
components.push({ name: "staro", type: new basic_1.IntegerType() });
|
|
325
|
+
components.push({ name: "datar", type: new basic_1.CharacterType(1, { qualifiedName: "sy-datar" }) });
|
|
326
|
+
components.push({ name: "host", type: new basic_1.CharacterType(32, { qualifiedName: "sy-host" }) });
|
|
327
|
+
components.push({ name: "locdb", type: new basic_1.CharacterType(1) });
|
|
328
|
+
components.push({ name: "locop", type: new basic_1.CharacterType(1) });
|
|
329
|
+
components.push({ name: "datlo", type: new basic_1.DateType() });
|
|
330
|
+
components.push({ name: "timlo", type: new basic_1.TimeType() });
|
|
246
331
|
components.push({ name: "zonlo", type: new basic_1.CharacterType(6, { qualifiedName: "sy-zonlo" }) });
|
|
247
332
|
const type = new basic_1.StructureType(components);
|
|
248
333
|
const id1 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "sy");
|
|
249
334
|
const sy = new _typed_identifier_1.TypedIdentifier(id1, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]);
|
|
250
335
|
const id2 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "syst");
|
|
251
336
|
const syst = new _typed_identifier_1.TypedIdentifier(id2, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]);
|
|
252
|
-
|
|
337
|
+
// https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abennews-610-system.htm
|
|
338
|
+
const id3 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "sy-repid");
|
|
339
|
+
const syrepid = new _typed_identifier_1.TypedIdentifier(id3, BuiltIn.filename, new basic_1.CharacterType(40, { qualifiedName: "sy-repid" }), ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]);
|
|
340
|
+
return [sy, syst, syrepid];
|
|
253
341
|
}
|
|
254
342
|
buildConstant(name, type, value) {
|
|
255
343
|
const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);
|
|
@@ -198,6 +198,14 @@ class TypeUtils {
|
|
|
198
198
|
}
|
|
199
199
|
return false;
|
|
200
200
|
}
|
|
201
|
+
structureContainsVoid(structure) {
|
|
202
|
+
for (const c of structure.getComponents()) {
|
|
203
|
+
if (c.type instanceof basic_1.VoidType) {
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return false;
|
|
208
|
+
}
|
|
201
209
|
isAssignableStrict(source, target) {
|
|
202
210
|
var _a, _b;
|
|
203
211
|
/*
|
|
@@ -262,19 +270,23 @@ class TypeUtils {
|
|
|
262
270
|
else if (sourceRowType instanceof basic_1.VoidType || sourceRowType instanceof basic_1.AnyType || sourceRowType instanceof basic_1.UnknownType) {
|
|
263
271
|
return true;
|
|
264
272
|
}
|
|
265
|
-
if (targetRowType instanceof basic_1.StructureType
|
|
273
|
+
if (targetRowType instanceof basic_1.StructureType
|
|
274
|
+
&& this.structureContainsString(targetRowType)) {
|
|
266
275
|
if (!(sourceRowType instanceof basic_1.StructureType)) {
|
|
267
276
|
return false;
|
|
268
277
|
}
|
|
269
|
-
else if (!(this.structureContainsString(sourceRowType))
|
|
278
|
+
else if (!(this.structureContainsString(sourceRowType))
|
|
279
|
+
&& this.structureContainsVoid(sourceRowType) === false) {
|
|
270
280
|
return false;
|
|
271
281
|
}
|
|
272
282
|
}
|
|
273
|
-
if (sourceRowType instanceof basic_1.StructureType
|
|
283
|
+
else if (sourceRowType instanceof basic_1.StructureType
|
|
284
|
+
&& this.structureContainsString(sourceRowType)) {
|
|
274
285
|
if (!(targetRowType instanceof basic_1.StructureType)) {
|
|
275
286
|
return false;
|
|
276
287
|
}
|
|
277
|
-
else if (!(this.structureContainsString(targetRowType))
|
|
288
|
+
else if (!(this.structureContainsString(targetRowType))
|
|
289
|
+
&& this.structureContainsVoid(targetRowType) === false) {
|
|
278
290
|
return false;
|
|
279
291
|
}
|
|
280
292
|
}
|
|
@@ -108,7 +108,7 @@ class BasicTypes {
|
|
|
108
108
|
throw new Error("resolveLikeName, chain undefined");
|
|
109
109
|
}
|
|
110
110
|
const fullName = chain.concatTokens();
|
|
111
|
-
|
|
111
|
+
let children = [...chain.getChildren()];
|
|
112
112
|
if (children.length === 0) {
|
|
113
113
|
return new Types.UnknownType("Type error, could not resolve \"" + fullName + "\", resolveLikeName1");
|
|
114
114
|
}
|
|
@@ -119,6 +119,11 @@ class BasicTypes {
|
|
|
119
119
|
else {
|
|
120
120
|
const name = children.shift().getFirstToken().getStr();
|
|
121
121
|
let found = this.scope.findVariable(name);
|
|
122
|
+
const full = this.scope.findVariable(fullName); // workaround for eg "sy-repid"
|
|
123
|
+
if (full) {
|
|
124
|
+
children = [];
|
|
125
|
+
found = full;
|
|
126
|
+
}
|
|
122
127
|
type = found === null || found === void 0 ? void 0 : found.getType();
|
|
123
128
|
if (found === undefined) {
|
|
124
129
|
found = this.scope.findExtraLikeType(name);
|
|
@@ -575,7 +580,15 @@ class BasicTypes {
|
|
|
575
580
|
resolveTypeChain(expr) {
|
|
576
581
|
var _a;
|
|
577
582
|
const chainText = expr.concatTokens().toUpperCase();
|
|
578
|
-
if (chainText.includes("
|
|
583
|
+
if (chainText.includes("-")) {
|
|
584
|
+
// workaround for stuff like "sy-repid"
|
|
585
|
+
const built = this.scope.findType(chainText);
|
|
586
|
+
if (built) {
|
|
587
|
+
this.scope.addReference(expr.getFirstToken(), built, _reference_1.ReferenceType.TypeReference, this.filename);
|
|
588
|
+
return built.getType();
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
else if (chainText.includes("=>") === false && chainText.includes("-") === false) {
|
|
579
592
|
return undefined;
|
|
580
593
|
}
|
|
581
594
|
let className;
|
|
@@ -7,6 +7,7 @@ const object_reference_type_1 = require("../../types/basic/object_reference_type
|
|
|
7
7
|
const _object_oriented_1 = require("../_object_oriented");
|
|
8
8
|
const data_reference_type_1 = require("../../types/basic/data_reference_type");
|
|
9
9
|
const _reference_1 = require("../_reference");
|
|
10
|
+
const basic_1 = require("../../types/basic");
|
|
10
11
|
class AttributeName {
|
|
11
12
|
runSyntax(context, node, scope, filename, type) {
|
|
12
13
|
if (context instanceof void_type_1.VoidType) {
|
|
@@ -42,7 +43,7 @@ class AttributeName {
|
|
|
42
43
|
else if (context instanceof data_reference_type_1.DataReference) {
|
|
43
44
|
const sub = context.getType();
|
|
44
45
|
const name = node.getFirstToken().getStr();
|
|
45
|
-
if (name === "*") {
|
|
46
|
+
if (name === "*" || sub instanceof void_type_1.VoidType || sub instanceof basic_1.AnyType) {
|
|
46
47
|
return sub;
|
|
47
48
|
}
|
|
48
49
|
if (!(sub instanceof structure_type_1.StructureType)) {
|
package/build/src/registry.js
CHANGED