@abaplint/transpiler-cli 2.7.137 → 2.7.139

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.
Files changed (2) hide show
  1. package/build/bundle.js +367 -285
  2. package/package.json +4 -4
package/build/bundle.js CHANGED
@@ -10614,7 +10614,8 @@ class DeleteMemory {
10614
10614
  getMatcher() {
10615
10615
  const memory = (0, combi_1.seq)("MEMORY ID", expressions_1.Source);
10616
10616
  const id = (0, combi_1.seq)("ID", expressions_1.Source);
10617
- const shared = (0, combi_1.seq)("SHARED MEMORY", expressions_1.Field, "(", expressions_1.Field, ")", id);
10617
+ const client = (0, combi_1.seq)("CLIENT", expressions_1.Source);
10618
+ const shared = (0, combi_1.seq)("SHARED MEMORY", expressions_1.Field, "(", expressions_1.Field, ")", (0, combi_1.optPrio)(client), id);
10618
10619
  const ret = (0, combi_1.seq)("DELETE FROM", (0, combi_1.alt)(memory, shared));
10619
10620
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
10620
10621
  }
@@ -19075,31 +19076,34 @@ class BuiltIn {
19075
19076
  constructor() {
19076
19077
  this.row = 1;
19077
19078
  }
19078
- buildDefinition(method, row) {
19079
- const token = new tokens_1.Identifier(new position_1.Position(row, 1), method.name);
19080
- return new BuiltInMethod(token, BuiltIn.filename, method, row);
19079
+ buildDefinition(method, name) {
19080
+ if (method.cache) {
19081
+ return method.cache;
19082
+ }
19083
+ const token = new tokens_1.Identifier(new position_1.Position(1, 1), name);
19084
+ const result = new BuiltInMethod(token, BuiltIn.filename, method, method.counter);
19085
+ method.cache = result;
19086
+ return result;
19081
19087
  }
19082
19088
  searchBuiltin(name) {
19083
19089
  if (name === undefined) {
19084
19090
  return undefined;
19085
19091
  }
19086
- // todo, optimize, use hash map
19087
- const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());
19088
- if (index < 0) {
19092
+ const def = BuiltIn.methods[name.toUpperCase()];
19093
+ if (def === undefined) {
19089
19094
  return undefined;
19090
19095
  }
19091
- return this.buildDefinition(BuiltIn.methods[index], index);
19096
+ return this.buildDefinition(def, name);
19092
19097
  }
19093
19098
  isPredicate(name) {
19094
19099
  if (name === undefined) {
19095
19100
  return undefined;
19096
19101
  }
19097
- // todo, optimize, use hash map
19098
- const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());
19099
- if (index < 0) {
19102
+ const def = BuiltIn.methods[name.toUpperCase()];
19103
+ if (def === undefined) {
19100
19104
  return undefined;
19101
19105
  }
19102
- return BuiltIn.methods[index].predicate;
19106
+ return def.predicate;
19103
19107
  }
19104
19108
  getTypes() {
19105
19109
  const ret = this.buildSY();
@@ -19114,32 +19118,36 @@ class BuiltIn {
19114
19118
  return ret;
19115
19119
  }
19116
19120
  get(extras) {
19117
- const ret = this.buildSY();
19118
- ret.push(this.buildVariable("screen")); // todo, add structure, or alternatively make native Statements
19119
- ret.push(this.buildConstant("%_ENDIAN"));
19120
- ret.push(this.buildConstant("%_CHARSIZE"));
19121
- ret.push(this.buildConstant("%_BACKSPACE", new basic_1.CharacterType(1), "\b"));
19122
- ret.push(this.buildConstant("%_CR_LF", new basic_1.CharacterType(2), "\r\n"));
19123
- ret.push(this.buildConstant("%_FORMFEED", new basic_1.CharacterType(1), "\f"));
19124
- ret.push(this.buildConstant("%_HORIZONTAL_TAB", new basic_1.CharacterType(1), "\t"));
19125
- ret.push(this.buildConstant("%_MAXCHAR", new basic_1.CharacterType(1), Buffer.from("FDFF", "hex").toString()));
19126
- ret.push(this.buildConstant("%_MINCHAR", new basic_1.CharacterType(1), Buffer.from("0000", "hex").toString()));
19127
- ret.push(this.buildConstant("%_NEWLINE", new basic_1.CharacterType(1), "\n"));
19128
- ret.push(this.buildConstant("%_VERTICAL_TAB", new basic_1.CharacterType(1), "\v"));
19129
- ret.push(this.buildConstant("abap_false", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '"));
19130
- ret.push(this.buildConstant("abap_true", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'"));
19131
- ret.push(this.buildConstant("abap_undefined", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'-'"));
19132
- ret.push(this.buildConstant("abap_off", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '"));
19133
- ret.push(this.buildConstant("abap_on", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'"));
19134
- ret.push(this.buildConstant("col_background", basic_1.IntegerType.get(), "0"));
19135
- ret.push(this.buildConstant("col_heading", basic_1.IntegerType.get(), "1"));
19136
- ret.push(this.buildConstant("col_key", basic_1.IntegerType.get(), "4"));
19137
- ret.push(this.buildConstant("col_negative", basic_1.IntegerType.get(), "6"));
19138
- ret.push(this.buildConstant("col_group", basic_1.IntegerType.get(), "7"));
19139
- ret.push(this.buildConstant("col_normal", basic_1.IntegerType.get(), "2"));
19140
- ret.push(this.buildConstant("col_positive", basic_1.IntegerType.get(), "5"));
19141
- ret.push(this.buildConstant("col_total", basic_1.IntegerType.get(), "3"));
19142
- ret.push(this.buildConstant("space", new basic_1.CharacterType(1, { derivedFromConstant: true }), "' '"));
19121
+ const ret = [];
19122
+ if (BuiltIn.getCache.length === 0) {
19123
+ BuiltIn.getCache.push(...this.buildSY());
19124
+ BuiltIn.getCache.push(this.buildVariable("screen"));
19125
+ BuiltIn.getCache.push(this.buildConstant("%_ENDIAN"));
19126
+ BuiltIn.getCache.push(this.buildConstant("%_CHARSIZE"));
19127
+ BuiltIn.getCache.push(this.buildConstant("%_BACKSPACE", new basic_1.CharacterType(1), "\b"));
19128
+ BuiltIn.getCache.push(this.buildConstant("%_CR_LF", new basic_1.CharacterType(2), "\r\n"));
19129
+ BuiltIn.getCache.push(this.buildConstant("%_FORMFEED", new basic_1.CharacterType(1), "\f"));
19130
+ BuiltIn.getCache.push(this.buildConstant("%_HORIZONTAL_TAB", new basic_1.CharacterType(1), "\t"));
19131
+ BuiltIn.getCache.push(this.buildConstant("%_MAXCHAR", new basic_1.CharacterType(1), Buffer.from("FDFF", "hex").toString()));
19132
+ BuiltIn.getCache.push(this.buildConstant("%_MINCHAR", new basic_1.CharacterType(1), Buffer.from("0000", "hex").toString()));
19133
+ BuiltIn.getCache.push(this.buildConstant("%_NEWLINE", new basic_1.CharacterType(1), "\n"));
19134
+ BuiltIn.getCache.push(this.buildConstant("%_VERTICAL_TAB", new basic_1.CharacterType(1), "\v"));
19135
+ BuiltIn.getCache.push(this.buildConstant("abap_false", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '"));
19136
+ BuiltIn.getCache.push(this.buildConstant("abap_true", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'"));
19137
+ BuiltIn.getCache.push(this.buildConstant("abap_undefined", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'-'"));
19138
+ BuiltIn.getCache.push(this.buildConstant("abap_off", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '"));
19139
+ BuiltIn.getCache.push(this.buildConstant("abap_on", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'"));
19140
+ BuiltIn.getCache.push(this.buildConstant("col_background", basic_1.IntegerType.get(), "0"));
19141
+ BuiltIn.getCache.push(this.buildConstant("col_heading", basic_1.IntegerType.get(), "1"));
19142
+ BuiltIn.getCache.push(this.buildConstant("col_key", basic_1.IntegerType.get(), "4"));
19143
+ BuiltIn.getCache.push(this.buildConstant("col_negative", basic_1.IntegerType.get(), "6"));
19144
+ BuiltIn.getCache.push(this.buildConstant("col_group", basic_1.IntegerType.get(), "7"));
19145
+ BuiltIn.getCache.push(this.buildConstant("col_normal", basic_1.IntegerType.get(), "2"));
19146
+ BuiltIn.getCache.push(this.buildConstant("col_positive", basic_1.IntegerType.get(), "5"));
19147
+ BuiltIn.getCache.push(this.buildConstant("col_total", basic_1.IntegerType.get(), "3"));
19148
+ BuiltIn.getCache.push(this.buildConstant("space", new basic_1.CharacterType(1, { derivedFromConstant: true }), "' '"));
19149
+ }
19150
+ ret.push(...BuiltIn.getCache);
19143
19151
  for (const e of extras) {
19144
19152
  const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), e);
19145
19153
  ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(e), ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */], "'?'"));
@@ -19147,6 +19155,10 @@ class BuiltIn {
19147
19155
  return ret;
19148
19156
  }
19149
19157
  /////////////////////////////
19158
+ buildVariable(name) {
19159
+ const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);
19160
+ return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), ["built-in" /* IdentifierMeta.BuiltIn */]);
19161
+ }
19150
19162
  buildSY() {
19151
19163
  const components = [];
19152
19164
  // NOTE: fields must be in correct sequence for the syntax check
@@ -19341,62 +19353,60 @@ class BuiltIn {
19341
19353
  }
19342
19354
  return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */], value);
19343
19355
  }
19344
- buildVariable(name) {
19345
- const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);
19346
- return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), ["built-in" /* IdentifierMeta.BuiltIn */]);
19347
- }
19348
19356
  }
19349
19357
  exports.BuiltIn = BuiltIn;
19350
19358
  BuiltIn.filename = "_builtin.prog.abap";
19359
+ BuiltIn.counter = 1;
19360
+ BuiltIn.getCache = [];
19351
19361
  // todo: "pcre" vs "regex", only one of these parameters are allowed
19352
19362
  // todo: "pcre", only possible from 755
19353
- BuiltIn.methods = [
19354
- {
19355
- name: "ABS",
19363
+ BuiltIn.methods = {
19364
+ "ABS": {
19365
+ counter: BuiltIn.counter++,
19356
19366
  mandatory: {
19357
19367
  "val": new basic_1.FloatType(),
19358
19368
  },
19359
19369
  return: basic_1.IntegerType.get(),
19360
19370
  },
19361
- {
19362
- name: "ACOS",
19371
+ "ACOS": {
19372
+ counter: BuiltIn.counter++,
19363
19373
  mandatory: {
19364
19374
  "val": new basic_1.FloatType(),
19365
19375
  },
19366
19376
  return: new basic_1.FloatType(),
19367
19377
  },
19368
- {
19369
- name: "ASIN",
19378
+ "ASIN": {
19379
+ counter: BuiltIn.counter++,
19370
19380
  mandatory: {
19371
19381
  "val": new basic_1.FloatType(),
19372
19382
  },
19373
19383
  return: new basic_1.FloatType(),
19374
19384
  },
19375
- {
19376
- name: "ATAN",
19385
+ "ATAN": {
19386
+ counter: BuiltIn.counter++,
19377
19387
  mandatory: {
19378
19388
  "val": new basic_1.FloatType(),
19379
19389
  },
19380
19390
  return: new basic_1.FloatType(),
19381
19391
  },
19382
- {
19383
- name: "BIT-SET",
19392
+ "BIT-SET": {
19393
+ counter: BuiltIn.counter++,
19384
19394
  mandatory: {
19385
19395
  "val": basic_1.IntegerType.get(),
19386
19396
  },
19387
19397
  return: new basic_1.XStringType(),
19388
19398
  version: version_1.Version.v702,
19389
19399
  },
19390
- {
19391
- name: "BOOLC",
19400
+ "BOOLC": {
19401
+ counter: BuiltIn.counter++,
19392
19402
  mandatory: {
19393
19403
  "val": basic_1.CLikeType.get(),
19394
19404
  },
19395
19405
  return: basic_1.StringType.get(),
19396
19406
  version: version_1.Version.v702,
19397
19407
  },
19398
- {
19399
- name: "BOOLX",
19408
+ "BOOLX": {
19409
+ counter: BuiltIn.counter++,
19400
19410
  mandatory: {
19401
19411
  "bool": basic_1.CLikeType.get(),
19402
19412
  },
@@ -19406,15 +19416,15 @@ BuiltIn.methods = [
19406
19416
  return: new basic_1.XStringType(),
19407
19417
  version: version_1.Version.v702,
19408
19418
  },
19409
- {
19410
- name: "CEIL",
19419
+ "CEIL": {
19420
+ counter: BuiltIn.counter++,
19411
19421
  mandatory: {
19412
19422
  "val": new basic_1.FloatType(),
19413
19423
  },
19414
19424
  return: basic_1.IntegerType.get(),
19415
19425
  },
19416
- {
19417
- name: "CHAR_OFF",
19426
+ "CHAR_OFF": {
19427
+ counter: BuiltIn.counter++,
19418
19428
  mandatory: {
19419
19429
  "val": basic_1.CLikeType.get(),
19420
19430
  "add": basic_1.IntegerType.get(),
@@ -19425,15 +19435,15 @@ BuiltIn.methods = [
19425
19435
  return: basic_1.IntegerType.get(),
19426
19436
  version: version_1.Version.v702,
19427
19437
  },
19428
- {
19429
- name: "CHARLEN",
19438
+ "CHARLEN": {
19439
+ counter: BuiltIn.counter++,
19430
19440
  mandatory: {
19431
19441
  "val": basic_1.CLikeType.get(),
19432
19442
  },
19433
19443
  return: basic_1.IntegerType.get(),
19434
19444
  },
19435
- {
19436
- name: "CMAX",
19445
+ "CMAX": {
19446
+ counter: BuiltIn.counter++,
19437
19447
  mandatory: {
19438
19448
  "val1": basic_1.CLikeType.get(),
19439
19449
  "val2": basic_1.CLikeType.get(),
@@ -19449,8 +19459,8 @@ BuiltIn.methods = [
19449
19459
  return: basic_1.StringType.get(),
19450
19460
  version: version_1.Version.v702,
19451
19461
  },
19452
- {
19453
- name: "CMIN",
19462
+ "CMIN": {
19463
+ counter: BuiltIn.counter++,
19454
19464
  mandatory: {
19455
19465
  "val1": basic_1.CLikeType.get(),
19456
19466
  "val2": basic_1.CLikeType.get(),
@@ -19466,8 +19476,8 @@ BuiltIn.methods = [
19466
19476
  return: basic_1.StringType.get(),
19467
19477
  version: version_1.Version.v702,
19468
19478
  },
19469
- {
19470
- name: "CONCAT_LINES_OF",
19479
+ "CONCAT_LINES_OF": {
19480
+ counter: BuiltIn.counter++,
19471
19481
  mandatory: {
19472
19482
  "table": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false, keyType: basic_1.TableKeyType.default }),
19473
19483
  },
@@ -19477,8 +19487,8 @@ BuiltIn.methods = [
19477
19487
  return: basic_1.StringType.get(),
19478
19488
  version: version_1.Version.v702,
19479
19489
  },
19480
- {
19481
- name: "CONDENSE",
19490
+ "CONDENSE": {
19491
+ counter: BuiltIn.counter++,
19482
19492
  mandatory: {
19483
19493
  "val": basic_1.CLikeType.get(),
19484
19494
  },
@@ -19490,8 +19500,8 @@ BuiltIn.methods = [
19490
19500
  return: basic_1.StringType.get(),
19491
19501
  version: version_1.Version.v702,
19492
19502
  },
19493
- {
19494
- name: "CONTAINS",
19503
+ "CONTAINS": {
19504
+ counter: BuiltIn.counter++,
19495
19505
  mandatory: {
19496
19506
  "val": basic_1.CLikeType.get(),
19497
19507
  },
@@ -19510,8 +19520,8 @@ BuiltIn.methods = [
19510
19520
  predicate: true,
19511
19521
  version: version_1.Version.v702,
19512
19522
  },
19513
- {
19514
- name: "CONTAINS_ANY_NOT_OF",
19523
+ "CONTAINS_ANY_NOT_OF": {
19524
+ counter: BuiltIn.counter++,
19515
19525
  mandatory: {
19516
19526
  "val": basic_1.CLikeType.get(),
19517
19527
  },
@@ -19526,8 +19536,8 @@ BuiltIn.methods = [
19526
19536
  predicate: true,
19527
19537
  return: new basic_1.CharacterType(1), version: version_1.Version.v702,
19528
19538
  },
19529
- {
19530
- name: "CONTAINS_ANY_OF",
19539
+ "CONTAINS_ANY_OF": {
19540
+ counter: BuiltIn.counter++,
19531
19541
  mandatory: {
19532
19542
  "val": basic_1.CLikeType.get(),
19533
19543
  },
@@ -19543,22 +19553,22 @@ BuiltIn.methods = [
19543
19553
  predicate: true,
19544
19554
  version: version_1.Version.v702,
19545
19555
  },
19546
- {
19547
- name: "COS",
19556
+ "COS": {
19557
+ counter: BuiltIn.counter++,
19548
19558
  mandatory: {
19549
19559
  "val": new basic_1.FloatType(),
19550
19560
  },
19551
19561
  return: new basic_1.FloatType(),
19552
19562
  },
19553
- {
19554
- name: "COSH",
19563
+ "COSH": {
19564
+ counter: BuiltIn.counter++,
19555
19565
  mandatory: {
19556
19566
  "val": new basic_1.FloatType(),
19557
19567
  },
19558
19568
  return: new basic_1.FloatType(),
19559
19569
  },
19560
- {
19561
- name: "COUNT",
19570
+ "COUNT": {
19571
+ counter: BuiltIn.counter++,
19562
19572
  mandatory: {
19563
19573
  "val": basic_1.CLikeType.get(),
19564
19574
  },
@@ -19573,8 +19583,8 @@ BuiltIn.methods = [
19573
19583
  return: basic_1.IntegerType.get(),
19574
19584
  version: version_1.Version.v702,
19575
19585
  },
19576
- {
19577
- name: "COUNT_ANY_NOT_OF",
19586
+ "COUNT_ANY_NOT_OF": {
19587
+ counter: BuiltIn.counter++,
19578
19588
  mandatory: {
19579
19589
  "val": basic_1.CLikeType.get(),
19580
19590
  },
@@ -19589,8 +19599,8 @@ BuiltIn.methods = [
19589
19599
  return: basic_1.IntegerType.get(),
19590
19600
  version: version_1.Version.v702,
19591
19601
  },
19592
- {
19593
- name: "COUNT_ANY_OF",
19602
+ "COUNT_ANY_OF": {
19603
+ counter: BuiltIn.counter++,
19594
19604
  mandatory: {
19595
19605
  "val": basic_1.CLikeType.get(),
19596
19606
  },
@@ -19605,15 +19615,15 @@ BuiltIn.methods = [
19605
19615
  return: basic_1.IntegerType.get(),
19606
19616
  version: version_1.Version.v702,
19607
19617
  },
19608
- {
19609
- name: "DBMAXLEN",
19618
+ "DBMAXLEN": {
19619
+ counter: BuiltIn.counter++,
19610
19620
  mandatory: {
19611
19621
  "val": basic_1.CLikeType.get(),
19612
19622
  },
19613
19623
  return: basic_1.IntegerType.get(),
19614
19624
  },
19615
- {
19616
- name: "DISTANCE",
19625
+ "DISTANCE": {
19626
+ counter: BuiltIn.counter++,
19617
19627
  mandatory: {
19618
19628
  "val1": basic_1.CLikeType.get(),
19619
19629
  "val2": basic_1.CLikeType.get(),
@@ -19621,8 +19631,8 @@ BuiltIn.methods = [
19621
19631
  return: basic_1.IntegerType.get(),
19622
19632
  version: version_1.Version.v702,
19623
19633
  },
19624
- {
19625
- name: "ESCAPE",
19634
+ "ESCAPE": {
19635
+ counter: BuiltIn.counter++,
19626
19636
  mandatory: {
19627
19637
  "val": basic_1.CLikeType.get(),
19628
19638
  "format": basic_1.CLikeType.get(),
@@ -19630,15 +19640,15 @@ BuiltIn.methods = [
19630
19640
  return: basic_1.StringType.get(),
19631
19641
  version: version_1.Version.v702,
19632
19642
  },
19633
- {
19634
- name: "EXP",
19643
+ "EXP": {
19644
+ counter: BuiltIn.counter++,
19635
19645
  mandatory: {
19636
19646
  "val": new basic_1.FloatType(),
19637
19647
  },
19638
19648
  return: new basic_1.FloatType(),
19639
19649
  },
19640
- {
19641
- name: "FIND",
19650
+ "FIND": {
19651
+ counter: BuiltIn.counter++,
19642
19652
  mandatory: {
19643
19653
  "val": basic_1.CLikeType.get(),
19644
19654
  },
@@ -19654,8 +19664,8 @@ BuiltIn.methods = [
19654
19664
  return: basic_1.IntegerType.get(),
19655
19665
  version: version_1.Version.v702,
19656
19666
  },
19657
- {
19658
- name: "FIND_ANY_NOT_OF",
19667
+ "FIND_ANY_NOT_OF": {
19668
+ counter: BuiltIn.counter++,
19659
19669
  mandatory: {
19660
19670
  "val": basic_1.CLikeType.get(),
19661
19671
  },
@@ -19668,8 +19678,8 @@ BuiltIn.methods = [
19668
19678
  return: basic_1.IntegerType.get(),
19669
19679
  version: version_1.Version.v702,
19670
19680
  },
19671
- {
19672
- name: "FIND_ANY_OF",
19681
+ "FIND_ANY_OF": {
19682
+ counter: BuiltIn.counter++,
19673
19683
  mandatory: {
19674
19684
  "val": basic_1.CLikeType.get(),
19675
19685
  },
@@ -19682,8 +19692,8 @@ BuiltIn.methods = [
19682
19692
  return: basic_1.IntegerType.get(),
19683
19693
  version: version_1.Version.v702,
19684
19694
  },
19685
- {
19686
- name: "FIND_END",
19695
+ "FIND_END": {
19696
+ counter: BuiltIn.counter++,
19687
19697
  mandatory: {
19688
19698
  "val": basic_1.CLikeType.get(),
19689
19699
  },
@@ -19699,22 +19709,22 @@ BuiltIn.methods = [
19699
19709
  return: basic_1.IntegerType.get(),
19700
19710
  version: version_1.Version.v702,
19701
19711
  },
19702
- {
19703
- name: "FLOOR",
19712
+ "FLOOR": {
19713
+ counter: BuiltIn.counter++,
19704
19714
  mandatory: {
19705
19715
  "val": new basic_1.FloatType(),
19706
19716
  },
19707
19717
  return: basic_1.IntegerType.get(),
19708
19718
  },
19709
- {
19710
- name: "FRAC",
19719
+ "FRAC": {
19720
+ counter: BuiltIn.counter++,
19711
19721
  mandatory: {
19712
19722
  "val": new basic_1.FloatType(),
19713
19723
  },
19714
19724
  return: basic_1.IntegerType.get(),
19715
19725
  },
19716
- {
19717
- name: "FROM_MIXED",
19726
+ "FROM_MIXED": {
19727
+ counter: BuiltIn.counter++,
19718
19728
  mandatory: {
19719
19729
  "val": basic_1.CLikeType.get()
19720
19730
  },
@@ -19726,8 +19736,8 @@ BuiltIn.methods = [
19726
19736
  return: basic_1.StringType.get(),
19727
19737
  version: version_1.Version.v702,
19728
19738
  },
19729
- {
19730
- name: "INSERT",
19739
+ "INSERT": {
19740
+ counter: BuiltIn.counter++,
19731
19741
  mandatory: {
19732
19742
  "val": basic_1.CLikeType.get(),
19733
19743
  "sub": basic_1.CLikeType.get(),
@@ -19738,8 +19748,8 @@ BuiltIn.methods = [
19738
19748
  return: basic_1.StringType.get(),
19739
19749
  version: version_1.Version.v702,
19740
19750
  },
19741
- {
19742
- name: "IPOW",
19751
+ "IPOW": {
19752
+ counter: BuiltIn.counter++,
19743
19753
  mandatory: {
19744
19754
  "base": new basic_1.FloatType(),
19745
19755
  "exp": new basic_1.FloatType(),
@@ -19747,8 +19757,8 @@ BuiltIn.methods = [
19747
19757
  return: basic_1.IntegerType.get(),
19748
19758
  version: version_1.Version.v740sp02,
19749
19759
  },
19750
- {
19751
- name: "LINE_EXISTS",
19760
+ "LINE_EXISTS": {
19761
+ counter: BuiltIn.counter++,
19752
19762
  mandatory: {
19753
19763
  "val": new basic_1.AnyType(),
19754
19764
  },
@@ -19756,37 +19766,37 @@ BuiltIn.methods = [
19756
19766
  predicate: true,
19757
19767
  version: version_1.Version.v740sp02,
19758
19768
  },
19759
- {
19760
- name: "LINE_INDEX",
19769
+ "LINE_INDEX": {
19770
+ counter: BuiltIn.counter++,
19761
19771
  mandatory: {
19762
19772
  "val": new basic_1.AnyType(),
19763
19773
  },
19764
19774
  return: basic_1.IntegerType.get(),
19765
19775
  version: version_1.Version.v740sp02,
19766
19776
  },
19767
- {
19768
- name: "LINES",
19777
+ "LINES": {
19778
+ counter: BuiltIn.counter++,
19769
19779
  mandatory: {
19770
19780
  "val": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false, keyType: basic_1.TableKeyType.default }),
19771
19781
  },
19772
19782
  return: basic_1.IntegerType.get(),
19773
19783
  },
19774
- {
19775
- name: "LOG",
19784
+ "LOG": {
19785
+ counter: BuiltIn.counter++,
19776
19786
  mandatory: {
19777
19787
  "val": new basic_1.FloatType(),
19778
19788
  },
19779
19789
  return: new basic_1.FloatType(),
19780
19790
  },
19781
- {
19782
- name: "LOG10",
19791
+ "LOG10": {
19792
+ counter: BuiltIn.counter++,
19783
19793
  mandatory: {
19784
19794
  "val": new basic_1.FloatType(),
19785
19795
  },
19786
19796
  return: new basic_1.FloatType(),
19787
19797
  },
19788
- {
19789
- name: "MATCH",
19798
+ "MATCH": {
19799
+ counter: BuiltIn.counter++,
19790
19800
  mandatory: {
19791
19801
  "val": basic_1.CLikeType.get(),
19792
19802
  }, optional: {
@@ -19798,8 +19808,8 @@ BuiltIn.methods = [
19798
19808
  return: basic_1.StringType.get(),
19799
19809
  version: version_1.Version.v702,
19800
19810
  },
19801
- {
19802
- name: "MATCHES",
19811
+ "MATCHES": {
19812
+ counter: BuiltIn.counter++,
19803
19813
  mandatory: {
19804
19814
  "val": basic_1.CLikeType.get(),
19805
19815
  },
@@ -19814,8 +19824,8 @@ BuiltIn.methods = [
19814
19824
  predicate: true,
19815
19825
  version: version_1.Version.v702,
19816
19826
  },
19817
- {
19818
- name: "NMAX",
19827
+ "NMAX": {
19828
+ counter: BuiltIn.counter++,
19819
19829
  mandatory: {
19820
19830
  "val1": basic_1.CLikeType.get(),
19821
19831
  "val2": basic_1.CLikeType.get(),
@@ -19832,8 +19842,8 @@ BuiltIn.methods = [
19832
19842
  return: basic_1.IntegerType.get(),
19833
19843
  version: version_1.Version.v702,
19834
19844
  },
19835
- {
19836
- name: "NMIN",
19845
+ "NMIN": {
19846
+ counter: BuiltIn.counter++,
19837
19847
  mandatory: {
19838
19848
  "val1": basic_1.CLikeType.get(),
19839
19849
  "val2": basic_1.CLikeType.get(),
@@ -19850,15 +19860,15 @@ BuiltIn.methods = [
19850
19860
  return: basic_1.IntegerType.get(),
19851
19861
  version: version_1.Version.v702,
19852
19862
  },
19853
- {
19854
- name: "NUMOFCHAR",
19863
+ "NUMOFCHAR": {
19864
+ counter: BuiltIn.counter++,
19855
19865
  mandatory: {
19856
19866
  "val": basic_1.CLikeType.get(),
19857
19867
  },
19858
19868
  return: basic_1.IntegerType.get(),
19859
19869
  },
19860
- {
19861
- name: "REPEAT",
19870
+ "REPEAT": {
19871
+ counter: BuiltIn.counter++,
19862
19872
  mandatory: {
19863
19873
  "val": basic_1.CLikeType.get(),
19864
19874
  "occ": basic_1.CLikeType.get(),
@@ -19866,8 +19876,8 @@ BuiltIn.methods = [
19866
19876
  return: basic_1.StringType.get(),
19867
19877
  version: version_1.Version.v702,
19868
19878
  },
19869
- {
19870
- name: "REPLACE",
19879
+ "REPLACE": {
19880
+ counter: BuiltIn.counter++,
19871
19881
  mandatory: {
19872
19882
  "val": basic_1.CLikeType.get(),
19873
19883
  "with": basic_1.CLikeType.get(),
@@ -19884,8 +19894,8 @@ BuiltIn.methods = [
19884
19894
  return: basic_1.StringType.get(),
19885
19895
  version: version_1.Version.v702,
19886
19896
  },
19887
- {
19888
- name: "RESCALE",
19897
+ "RESCALE": {
19898
+ counter: BuiltIn.counter++,
19889
19899
  mandatory: {
19890
19900
  "val": new basic_1.FloatType(),
19891
19901
  },
@@ -19897,16 +19907,16 @@ BuiltIn.methods = [
19897
19907
  return: new basic_1.FloatType(),
19898
19908
  version: version_1.Version.v702,
19899
19909
  },
19900
- {
19901
- name: "REVERSE",
19910
+ "REVERSE": {
19911
+ counter: BuiltIn.counter++,
19902
19912
  mandatory: {
19903
19913
  "val": basic_1.CLikeType.get(),
19904
19914
  },
19905
19915
  return: basic_1.StringType.get(),
19906
19916
  version: version_1.Version.v702,
19907
19917
  },
19908
- {
19909
- name: "ROUND",
19918
+ "ROUND": {
19919
+ counter: BuiltIn.counter++,
19910
19920
  mandatory: {
19911
19921
  "val": new basic_1.FloatType(),
19912
19922
  },
@@ -19918,8 +19928,8 @@ BuiltIn.methods = [
19918
19928
  return: basic_1.IntegerType.get(),
19919
19929
  version: version_1.Version.v702,
19920
19930
  },
19921
- {
19922
- name: "SEGMENT",
19931
+ "SEGMENT": {
19932
+ counter: BuiltIn.counter++,
19923
19933
  mandatory: {
19924
19934
  "val": basic_1.CLikeType.get(),
19925
19935
  "index": basic_1.IntegerType.get(),
@@ -19931,8 +19941,8 @@ BuiltIn.methods = [
19931
19941
  return: basic_1.StringType.get(),
19932
19942
  version: version_1.Version.v702,
19933
19943
  },
19934
- {
19935
- name: "SHIFT_LEFT",
19944
+ "SHIFT_LEFT": {
19945
+ counter: BuiltIn.counter++,
19936
19946
  mandatory: {
19937
19947
  "val": basic_1.CLikeType.get(),
19938
19948
  },
@@ -19944,8 +19954,8 @@ BuiltIn.methods = [
19944
19954
  return: basic_1.StringType.get(),
19945
19955
  version: version_1.Version.v702,
19946
19956
  },
19947
- {
19948
- name: "SHIFT_RIGHT",
19957
+ "SHIFT_RIGHT": {
19958
+ counter: BuiltIn.counter++,
19949
19959
  mandatory: {
19950
19960
  "val": basic_1.CLikeType.get(),
19951
19961
  },
@@ -19957,43 +19967,43 @@ BuiltIn.methods = [
19957
19967
  return: basic_1.StringType.get(),
19958
19968
  version: version_1.Version.v702,
19959
19969
  },
19960
- {
19961
- name: "SIGN",
19970
+ "SIGN": {
19971
+ counter: BuiltIn.counter++,
19962
19972
  mandatory: {
19963
19973
  "val": new basic_1.FloatType(),
19964
19974
  },
19965
19975
  return: basic_1.IntegerType.get(),
19966
19976
  },
19967
- {
19968
- name: "SIN",
19977
+ "SIN": {
19978
+ counter: BuiltIn.counter++,
19969
19979
  mandatory: {
19970
19980
  "val": new basic_1.FloatType(),
19971
19981
  },
19972
19982
  return: new basic_1.FloatType(),
19973
19983
  },
19974
- {
19975
- name: "SINH",
19984
+ "SINH": {
19985
+ counter: BuiltIn.counter++,
19976
19986
  mandatory: {
19977
19987
  "val": new basic_1.FloatType(),
19978
19988
  },
19979
19989
  return: new basic_1.FloatType(),
19980
19990
  },
19981
- {
19982
- name: "SQRT",
19991
+ "SQRT": {
19992
+ counter: BuiltIn.counter++,
19983
19993
  mandatory: {
19984
19994
  "val": new basic_1.FloatType(),
19985
19995
  },
19986
19996
  return: new basic_1.FloatType(),
19987
19997
  },
19988
- {
19989
- name: "STRLEN",
19998
+ "STRLEN": {
19999
+ counter: BuiltIn.counter++,
19990
20000
  mandatory: {
19991
20001
  "val": basic_1.CLikeType.get(),
19992
20002
  },
19993
20003
  return: basic_1.IntegerType.get(),
19994
20004
  },
19995
- {
19996
- name: "SUBSTRING",
20005
+ "SUBSTRING": {
20006
+ counter: BuiltIn.counter++,
19997
20007
  mandatory: {
19998
20008
  "val": basic_1.CLikeType.get(),
19999
20009
  },
@@ -20004,8 +20014,8 @@ BuiltIn.methods = [
20004
20014
  return: basic_1.StringType.get(),
20005
20015
  version: version_1.Version.v702,
20006
20016
  },
20007
- {
20008
- name: "SUBSTRING_AFTER",
20017
+ "SUBSTRING_AFTER": {
20018
+ counter: BuiltIn.counter++,
20009
20019
  mandatory: {
20010
20020
  "val": basic_1.CLikeType.get(),
20011
20021
  },
@@ -20020,8 +20030,8 @@ BuiltIn.methods = [
20020
20030
  return: basic_1.StringType.get(),
20021
20031
  version: version_1.Version.v702,
20022
20032
  },
20023
- {
20024
- name: "SUBSTRING_BEFORE",
20033
+ "SUBSTRING_BEFORE": {
20034
+ counter: BuiltIn.counter++,
20025
20035
  mandatory: {
20026
20036
  "val": basic_1.CLikeType.get(),
20027
20037
  },
@@ -20036,8 +20046,8 @@ BuiltIn.methods = [
20036
20046
  return: basic_1.StringType.get(),
20037
20047
  version: version_1.Version.v702,
20038
20048
  },
20039
- {
20040
- name: "SUBSTRING_FROM",
20049
+ "SUBSTRING_FROM": {
20050
+ counter: BuiltIn.counter++,
20041
20051
  mandatory: {
20042
20052
  "val": basic_1.CLikeType.get(),
20043
20053
  },
@@ -20052,8 +20062,8 @@ BuiltIn.methods = [
20052
20062
  return: basic_1.StringType.get(),
20053
20063
  version: version_1.Version.v702,
20054
20064
  },
20055
- {
20056
- name: "SUBSTRING_TO",
20065
+ "SUBSTRING_TO": {
20066
+ counter: BuiltIn.counter++,
20057
20067
  mandatory: {
20058
20068
  "val": basic_1.CLikeType.get(),
20059
20069
  },
@@ -20068,30 +20078,30 @@ BuiltIn.methods = [
20068
20078
  return: basic_1.StringType.get(),
20069
20079
  version: version_1.Version.v702,
20070
20080
  },
20071
- {
20072
- name: "TAN",
20081
+ "TAN": {
20082
+ counter: BuiltIn.counter++,
20073
20083
  mandatory: {
20074
20084
  "val": new basic_1.FloatType(),
20075
20085
  },
20076
20086
  return: new basic_1.FloatType(),
20077
20087
  },
20078
- {
20079
- name: "TANH",
20088
+ "TANH": {
20089
+ counter: BuiltIn.counter++,
20080
20090
  mandatory: {
20081
20091
  "val": new basic_1.FloatType(),
20082
20092
  },
20083
20093
  return: new basic_1.FloatType(),
20084
20094
  },
20085
- {
20086
- name: "TO_LOWER",
20095
+ "TO_LOWER": {
20096
+ counter: BuiltIn.counter++,
20087
20097
  mandatory: {
20088
20098
  "val": basic_1.CLikeType.get(),
20089
20099
  },
20090
20100
  return: basic_1.StringType.get(),
20091
20101
  version: version_1.Version.v702,
20092
20102
  },
20093
- {
20094
- name: "TO_MIXED",
20103
+ "TO_MIXED": {
20104
+ counter: BuiltIn.counter++,
20095
20105
  mandatory: {
20096
20106
  "val": basic_1.CLikeType.get(),
20097
20107
  },
@@ -20103,14 +20113,14 @@ BuiltIn.methods = [
20103
20113
  return: basic_1.StringType.get(),
20104
20114
  version: version_1.Version.v702,
20105
20115
  },
20106
- {
20107
- name: "TO_UPPER",
20116
+ "TO_UPPER": {
20117
+ counter: BuiltIn.counter++,
20108
20118
  mandatory: { "val": basic_1.CLikeType.get() },
20109
20119
  return: basic_1.StringType.get(),
20110
20120
  version: version_1.Version.v702,
20111
20121
  },
20112
- {
20113
- name: "TRANSLATE",
20122
+ "TRANSLATE": {
20123
+ counter: BuiltIn.counter++,
20114
20124
  mandatory: {
20115
20125
  "val": basic_1.CLikeType.get(),
20116
20126
  "from": basic_1.CLikeType.get(),
@@ -20119,15 +20129,15 @@ BuiltIn.methods = [
20119
20129
  return: basic_1.StringType.get(),
20120
20130
  version: version_1.Version.v702,
20121
20131
  },
20122
- {
20123
- name: "TRUNC",
20132
+ "TRUNC": {
20133
+ counter: BuiltIn.counter++,
20124
20134
  mandatory: {
20125
20135
  "val": new basic_1.FloatType(),
20126
20136
  },
20127
20137
  return: basic_1.IntegerType.get(),
20128
20138
  },
20129
- {
20130
- name: "UTCLONG_ADD",
20139
+ "UTCLONG_ADD": {
20140
+ counter: BuiltIn.counter++,
20131
20141
  mandatory: {
20132
20142
  "val": new basic_1.UTCLongType(),
20133
20143
  },
@@ -20140,13 +20150,13 @@ BuiltIn.methods = [
20140
20150
  return: new basic_1.UTCLongType(),
20141
20151
  version: version_1.Version.v754,
20142
20152
  },
20143
- {
20144
- name: "UTCLONG_CURRENT",
20153
+ "UTCLONG_CURRENT": {
20154
+ counter: BuiltIn.counter++,
20145
20155
  return: new basic_1.UTCLongType(),
20146
20156
  version: version_1.Version.v754,
20147
20157
  },
20148
- {
20149
- name: "UTCLONG_DIFF",
20158
+ "UTCLONG_DIFF": {
20159
+ counter: BuiltIn.counter++,
20150
20160
  mandatory: {
20151
20161
  "high": new basic_1.UTCLongType(),
20152
20162
  "low": new basic_1.UTCLongType(),
@@ -20154,22 +20164,22 @@ BuiltIn.methods = [
20154
20164
  return: new basic_1.FloatType(),
20155
20165
  version: version_1.Version.v754,
20156
20166
  },
20157
- {
20158
- name: "XSDBOOL",
20167
+ "XSDBOOL": {
20168
+ counter: BuiltIn.counter++,
20159
20169
  mandatory: {
20160
20170
  "val": basic_1.CLikeType.get(),
20161
20171
  },
20162
20172
  return: new basic_1.CharacterType(1),
20163
20173
  version: version_1.Version.v740sp08,
20164
20174
  },
20165
- {
20166
- name: "XSTRLEN",
20175
+ "XSTRLEN": {
20176
+ counter: BuiltIn.counter++,
20167
20177
  mandatory: {
20168
20178
  "val": new basic_1.XSequenceType(),
20169
20179
  },
20170
20180
  return: basic_1.IntegerType.get(),
20171
20181
  },
20172
- ];
20182
+ };
20173
20183
  //# sourceMappingURL=_builtin.js.map
20174
20184
 
20175
20185
  /***/ }),
@@ -20190,7 +20200,6 @@ const position_1 = __webpack_require__(/*! ../../position */ "./node_modules/@ab
20190
20200
  const spaghetti_scope_1 = __webpack_require__(/*! ./spaghetti_scope */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/spaghetti_scope.js");
20191
20201
  const _identifier_1 = __webpack_require__(/*! ../4_file_information/_identifier */ "./node_modules/@abaplint/core/build/src/abap/4_file_information/_identifier.js");
20192
20202
  const _scope_type_1 = __webpack_require__(/*! ./_scope_type */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_scope_type.js");
20193
- const _reference_1 = __webpack_require__(/*! ./_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
20194
20203
  const syntax_1 = __webpack_require__(/*! ./syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
20195
20204
  class CurrentScope {
20196
20205
  static buildDefault(reg, obj) {
@@ -20282,8 +20291,14 @@ class CurrentScope {
20282
20291
  this.current.getData().forms.push(...f);
20283
20292
  }
20284
20293
  addInterfaceDefinition(i) {
20285
- var _a;
20286
- (_a = this.current) === null || _a === void 0 ? void 0 : _a.getData().idefs.push(i);
20294
+ if (this.current === undefined) {
20295
+ return;
20296
+ }
20297
+ const name = i.getName().toUpperCase();
20298
+ if (this.current.getData().cdefs[name] !== undefined) {
20299
+ throw new Error(`Interface "${name}" already defined`);
20300
+ }
20301
+ this.current.getData().idefs[name] = i;
20287
20302
  }
20288
20303
  addNamedIdentifier(name, identifier) {
20289
20304
  if (this.current === undefined) {
@@ -20378,11 +20393,10 @@ class CurrentScope {
20378
20393
  }
20379
20394
  return false;
20380
20395
  }
20381
- // todo, found + type can be removed from method output?
20382
20396
  existsObject(name) {
20383
20397
  var _a, _b, _c;
20384
20398
  if (name === undefined) {
20385
- return { found: false };
20399
+ return undefined;
20386
20400
  }
20387
20401
  let prefixRTTI = "";
20388
20402
  if (this.parentObj.getType() === "PROG") {
@@ -20396,28 +20410,28 @@ class CurrentScope {
20396
20410
  if (findLocalClass.isGlobal() === true) {
20397
20411
  prefixRTTI = "";
20398
20412
  }
20399
- return { found: true, id: findLocalClass, type: _reference_1.ReferenceType.ObjectOrientedReference, ooType: "CLAS", RTTIName: prefixRTTI + "\\CLASS=" + findLocalClass.getName() };
20413
+ return { id: findLocalClass, ooType: "CLAS", RTTIName: prefixRTTI + "\\CLASS=" + findLocalClass.getName() };
20400
20414
  }
20401
20415
  const globalClas = this.reg.getObject("CLAS", name);
20402
20416
  if (globalClas) {
20403
- return { found: true, id: globalClas.getIdentifier(), type: _reference_1.ReferenceType.ObjectOrientedReference, ooType: "CLAS", RTTIName: "\\CLASS=" + globalClas.getName() };
20417
+ return { id: globalClas.getIdentifier(), ooType: "CLAS", RTTIName: "\\CLASS=" + globalClas.getName() };
20404
20418
  }
20405
20419
  const findLocalInterface = (_b = this.current) === null || _b === void 0 ? void 0 : _b.findInterfaceDefinition(name);
20406
20420
  if (findLocalInterface) {
20407
20421
  if (findLocalInterface.isGlobal() === true) {
20408
20422
  prefixRTTI = "";
20409
20423
  }
20410
- return { found: true, id: findLocalInterface, type: _reference_1.ReferenceType.ObjectOrientedReference, ooType: "INTF", RTTIName: prefixRTTI + "\\INTERFACE=" + findLocalInterface.getName() };
20424
+ return { id: findLocalInterface, ooType: "INTF", RTTIName: prefixRTTI + "\\INTERFACE=" + findLocalInterface.getName() };
20411
20425
  }
20412
20426
  const globalIntf = this.reg.getObject("INTF", name);
20413
20427
  if (globalIntf) {
20414
- return { found: true, id: globalIntf.getIdentifier(), type: _reference_1.ReferenceType.ObjectOrientedReference, ooType: "INTF", RTTIName: "\\INTERFACE=" + globalIntf.getName() };
20428
+ return { id: globalIntf.getIdentifier(), ooType: "INTF", RTTIName: "\\INTERFACE=" + globalIntf.getName() };
20415
20429
  }
20416
20430
  const def = (_c = this.current) === null || _c === void 0 ? void 0 : _c.findDeferred(name);
20417
20431
  if (def !== undefined) {
20418
- return { found: true, id: def };
20432
+ return { id: def };
20419
20433
  }
20420
- return { found: false };
20434
+ return undefined;
20421
20435
  }
20422
20436
  ///////////////////////////
20423
20437
  /** Lookup class in local and global scope */
@@ -21500,6 +21514,9 @@ class TypeUtils {
21500
21514
  }
21501
21515
  return true;
21502
21516
  }
21517
+ else if (target instanceof basic_1.CLikeType) {
21518
+ return this.isCharLikeStrict(source);
21519
+ }
21503
21520
  else if (target instanceof basic_1.VoidType || target instanceof basic_1.AnyType) {
21504
21521
  return true;
21505
21522
  }
@@ -21534,6 +21551,8 @@ class TypeUtils {
21534
21551
  else if (source instanceof basic_1.ObjectReferenceType) {
21535
21552
  if (target instanceof basic_1.XSequenceType
21536
21553
  || target instanceof basic_1.IntegerType
21554
+ || target instanceof basic_1.StructureType
21555
+ || target instanceof basic_1.TableType
21537
21556
  || target instanceof basic_1.XStringType) {
21538
21557
  return false;
21539
21558
  }
@@ -22455,7 +22474,7 @@ class BasicTypes {
22455
22474
  else if (firstNode.get() instanceof Expressions.ClassName) {
22456
22475
  const obj = this.scope.findObjectDefinition(firstName);
22457
22476
  if (obj === undefined) {
22458
- if (this.scope.existsObject(firstName).found === true) {
22477
+ if (this.scope.existsObject(firstName) !== undefined) {
22459
22478
  return undefined;
22460
22479
  }
22461
22480
  else if (this.scope.getDDIC().inErrorNamespace(firstName) === true) {
@@ -22502,7 +22521,7 @@ class BasicTypes {
22502
22521
  return new Types.GenericObjectReferenceType();
22503
22522
  }
22504
22523
  const search = this.scope.existsObject(name);
22505
- if (search.found === true && search.id) {
22524
+ if (search === null || search === void 0 ? void 0 : search.id) {
22506
22525
  this.scope.addReference(chain.getFirstToken(), search.id, _reference_1.ReferenceType.ObjectOrientedReference, this.filename, { ooType: search.ooType, ooName: name });
22507
22526
  return new Types.ObjectReferenceType(search.id, { qualifiedName: name, RTTIName: search.RTTIName });
22508
22527
  }
@@ -23678,8 +23697,8 @@ class FieldChain {
23678
23697
  return new basic_1.GenericObjectReferenceType();
23679
23698
  }
23680
23699
  const found = scope.existsObject(classNam);
23681
- if (found.found === true && found.id) {
23682
- scope.addReference(classTok, found.id, found.type, filename);
23700
+ if (found === null || found === void 0 ? void 0 : found.id) {
23701
+ scope.addReference(classTok, found.id, _reference_1.ReferenceType.ObjectOrientedReference, filename);
23683
23702
  return new basic_1.ObjectReferenceType(found.id);
23684
23703
  }
23685
23704
  else if (scope.getDDIC().inErrorNamespace(classNam) === false) {
@@ -24491,8 +24510,13 @@ class MethodCallParam {
24491
24510
  else if (child instanceof nodes_1.ExpressionNode
24492
24511
  && (child.get() instanceof Expressions.Source
24493
24512
  || child.get() instanceof Expressions.ConstantString)) {
24494
- if (!(method instanceof basic_1.VoidType) && method.getParameters().getImporting().length === 0) {
24495
- throw new Error("Method \"" + method.getName() + "\" has no importing parameters");
24513
+ if (!(method instanceof basic_1.VoidType)) {
24514
+ if (method.getParameters().getImporting().length === 0) {
24515
+ throw new Error("Method \"" + method.getName() + "\" has no importing parameters");
24516
+ }
24517
+ else if (method.getParameters().getRequiredParameters().length > 1) {
24518
+ throw new Error("Method \"" + method.getName() + "\" has more than one importing or changing parameter");
24519
+ }
24496
24520
  }
24497
24521
  let targetType = undefined;
24498
24522
  if (!(method instanceof basic_1.VoidType)) {
@@ -25062,6 +25086,12 @@ class NewObject {
25062
25086
  if (clas) {
25063
25087
  scope.addReference(typeToken, clas, _reference_1.ReferenceType.InferredType, filename);
25064
25088
  }
25089
+ else {
25090
+ const intf = scope.findInterfaceDefinition(targetType.getIdentifierName());
25091
+ if (intf) {
25092
+ throw new Error(intf.getName() + " is an interface, cannot be instantiated");
25093
+ }
25094
+ }
25065
25095
  ret = targetType;
25066
25096
  if ((clas === null || clas === void 0 ? void 0 : clas.isAbstract()) === true) {
25067
25097
  throw new Error(clas.getName() + " is abstract, cannot be instantiated");
@@ -26227,6 +26257,7 @@ const field_offset_1 = __webpack_require__(/*! ./field_offset */ "./node_modules
26227
26257
  const _reference_1 = __webpack_require__(/*! ../_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
26228
26258
  const table_expression_1 = __webpack_require__(/*! ./table_expression */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/table_expression.js");
26229
26259
  const expressions_1 = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
26260
+ const field_length_1 = __webpack_require__(/*! ./field_length */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/field_length.js");
26230
26261
  class Target {
26231
26262
  runSyntax(node, scope, filename) {
26232
26263
  const concat = node.concatTokens();
@@ -26309,8 +26340,18 @@ class Target {
26309
26340
  }
26310
26341
  const offset = node.findDirectExpression(Expressions.FieldOffset);
26311
26342
  if (offset) {
26343
+ if (context instanceof basic_1.XStringType || context instanceof basic_1.StringType) {
26344
+ throw new Error("xstring/string offset/length in writer position not possible");
26345
+ }
26312
26346
  new field_offset_1.FieldOffset().runSyntax(offset, scope, filename);
26313
26347
  }
26348
+ const length = node.findDirectExpression(Expressions.FieldLength);
26349
+ if (length) {
26350
+ if (context instanceof basic_1.XStringType || context instanceof basic_1.StringType) {
26351
+ throw new Error("xstring/string offset/length in writer position not possible");
26352
+ }
26353
+ new field_length_1.FieldLength().runSyntax(length, scope, filename);
26354
+ }
26314
26355
  return context;
26315
26356
  }
26316
26357
  /////////////////////////////////
@@ -26696,7 +26737,7 @@ class ScopeData {
26696
26737
  this.data = {
26697
26738
  vars: {},
26698
26739
  cdefs: {},
26699
- idefs: [], // todo, refactor to object
26740
+ idefs: {},
26700
26741
  forms: [], // todo, refactor to object
26701
26742
  types: {},
26702
26743
  extraLikeTypes: {},
@@ -26798,26 +26839,13 @@ class SpaghettiScopeNode extends ScopeData {
26798
26839
  }
26799
26840
  return undefined;
26800
26841
  }
26801
- // todo, can be deleted, not called from anywhere?
26802
- listFormDefinitions() {
26803
- let search = this;
26804
- const ret = [];
26805
- while (search !== undefined) {
26806
- for (const form of search.getData().forms) {
26807
- ret.push(form);
26808
- }
26809
- search = search.getParent();
26810
- }
26811
- return ret;
26812
- }
26813
- // todo, optimize
26814
26842
  findInterfaceDefinition(name) {
26815
26843
  let search = this;
26844
+ const upper = name.toUpperCase();
26816
26845
  while (search !== undefined) {
26817
- for (const idef of search.getData().idefs) {
26818
- if (idef.getName().toUpperCase() === name.toUpperCase()) {
26819
- return idef;
26820
- }
26846
+ const idef = search.getData().idefs[upper];
26847
+ if (idef) {
26848
+ return idef;
26821
26849
  }
26822
26850
  search = search.getParent();
26823
26851
  }
@@ -26827,9 +26855,9 @@ class SpaghettiScopeNode extends ScopeData {
26827
26855
  let search = this;
26828
26856
  const upper = name.toUpperCase();
26829
26857
  while (search !== undefined) {
26830
- const data = search.getData();
26831
- if (data.types[upper]) {
26832
- return data.types[upper];
26858
+ const found = search.getData().types[upper];
26859
+ if (found) {
26860
+ return found;
26833
26861
  }
26834
26862
  search = search.getParent();
26835
26863
  }
@@ -27178,9 +27206,9 @@ class Assign {
27178
27206
  const thirdAssign = assignSource === null || assignSource === void 0 ? void 0 : assignSource.getChildren()[2];
27179
27207
  if ((secondAssign === null || secondAssign === void 0 ? void 0 : secondAssign.concatTokens()) === "=>" && firstAssign && (thirdAssign === null || thirdAssign === void 0 ? void 0 : thirdAssign.get()) instanceof Expressions.Dynamic) {
27180
27208
  const name = firstAssign.concatTokens();
27181
- const found = scope.findObjectDefinition(name) === undefined || scope.findVariable(name);
27182
- if (found === undefined && scope.getDDIC().inErrorNamespace(name)) {
27183
- throw new Error(secondAssign.concatTokens() + " not found");
27209
+ const found = scope.findClassDefinition(name) || scope.findVariable(name);
27210
+ if (found === undefined && scope.getDDIC().inErrorNamespace(name) && name.startsWith("(") === false) {
27211
+ throw new Error(name + " not found, dynamic");
27184
27212
  }
27185
27213
  sourceType = new basic_1.VoidType("Dynamic");
27186
27214
  }
@@ -27535,8 +27563,8 @@ class Catch {
27535
27563
  const token = c.getFirstToken();
27536
27564
  const className = token.getStr().toUpperCase();
27537
27565
  const found = scope.existsObject(className);
27538
- if (found.found === true && found.id) {
27539
- scope.addReference(token, found.id, found.type, filename);
27566
+ if (found === null || found === void 0 ? void 0 : found.id) {
27567
+ scope.addReference(token, found.id, _reference_1.ReferenceType.ObjectOrientedReference, filename);
27540
27568
  }
27541
27569
  else if (scope.getDDIC().inErrorNamespace(className) === false) {
27542
27570
  const extra = { ooName: className, ooType: "Void" };
@@ -27555,7 +27583,7 @@ class Catch {
27555
27583
  if (target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData)) {
27556
27584
  const token = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.getFirstToken();
27557
27585
  const found = scope.existsObject(firstClassName);
27558
- if (token && found.found === true && firstClassName && found.id) {
27586
+ if (token && firstClassName && (found === null || found === void 0 ? void 0 : found.id)) {
27559
27587
  const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.ObjectReferenceType(found.id), ["inline" /* IdentifierMeta.InlineDefinition */]);
27560
27588
  scope.addIdentifier(identifier);
27561
27589
  scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
@@ -27758,7 +27786,7 @@ class ClassLocalFriends {
27758
27786
  const className = classNames[i].concatTokens();
27759
27787
  // make sure to check also DEFINITION DEFERRED
27760
27788
  const found = scope.existsObject(className);
27761
- if (found.found === false) {
27789
+ if (found === undefined) {
27762
27790
  throw new Error(`Class ${className.toUpperCase()} not found`);
27763
27791
  }
27764
27792
  }
@@ -30188,8 +30216,8 @@ class Raise {
30188
30216
  const className = classTok === null || classTok === void 0 ? void 0 : classTok.getStr();
30189
30217
  if (className) {
30190
30218
  const found = scope.existsObject(className);
30191
- if (found.found === true && found.id) {
30192
- scope.addReference(classTok, found.id, found.type, filename);
30219
+ if (found === null || found === void 0 ? void 0 : found.id) {
30220
+ scope.addReference(classTok, found.id, _reference_1.ReferenceType.ObjectOrientedReference, filename);
30193
30221
  const def = scope.findObjectDefinition(className);
30194
30222
  method = (_b = helper.searchMethodName(def, "CONSTRUCTOR")) === null || _b === void 0 ? void 0 : _b.method;
30195
30223
  }
@@ -35738,8 +35766,8 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
35738
35766
  exports.VoidType = void 0;
35739
35767
  const _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js");
35740
35768
  class VoidType extends _abstract_type_1.AbstractType {
35741
- constructor(voided, name) {
35742
- super({ qualifiedName: name });
35769
+ constructor(voided, qualifiedName) {
35770
+ super({ qualifiedName: qualifiedName });
35743
35771
  this.voided = voided;
35744
35772
  }
35745
35773
  getVoided() {
@@ -45647,6 +45675,29 @@ __exportStar(__webpack_require__(/*! ./message_class */ "./node_modules/@abaplin
45647
45675
  __exportStar(__webpack_require__(/*! ./messaging_channel */ "./node_modules/@abaplint/core/build/src/objects/messaging_channel.js"), exports);
45648
45676
  __exportStar(__webpack_require__(/*! ./mime_object */ "./node_modules/@abaplint/core/build/src/objects/mime_object.js"), exports);
45649
45677
  __exportStar(__webpack_require__(/*! ./namespace */ "./node_modules/@abaplint/core/build/src/objects/namespace.js"), exports);
45678
+ __exportStar(__webpack_require__(/*! ./neptune_api */ "./node_modules/@abaplint/core/build/src/objects/neptune_api.js"), exports);
45679
+ __exportStar(__webpack_require__(/*! ./neptune_app */ "./node_modules/@abaplint/core/build/src/objects/neptune_app.js"), exports);
45680
+ __exportStar(__webpack_require__(/*! ./neptune_custom_color */ "./node_modules/@abaplint/core/build/src/objects/neptune_custom_color.js"), exports);
45681
+ __exportStar(__webpack_require__(/*! ./neptune_custom_js_helper */ "./node_modules/@abaplint/core/build/src/objects/neptune_custom_js_helper.js"), exports);
45682
+ __exportStar(__webpack_require__(/*! ./neptune_documentation */ "./node_modules/@abaplint/core/build/src/objects/neptune_documentation.js"), exports);
45683
+ __exportStar(__webpack_require__(/*! ./neptune_enhancement */ "./node_modules/@abaplint/core/build/src/objects/neptune_enhancement.js"), exports);
45684
+ __exportStar(__webpack_require__(/*! ./neptune_launchpad_layout */ "./node_modules/@abaplint/core/build/src/objects/neptune_launchpad_layout.js"), exports);
45685
+ __exportStar(__webpack_require__(/*! ./neptune_launchpad */ "./node_modules/@abaplint/core/build/src/objects/neptune_launchpad.js"), exports);
45686
+ __exportStar(__webpack_require__(/*! ./neptune_login_page */ "./node_modules/@abaplint/core/build/src/objects/neptune_login_page.js"), exports);
45687
+ __exportStar(__webpack_require__(/*! ./neptune_media_library */ "./node_modules/@abaplint/core/build/src/objects/neptune_media_library.js"), exports);
45688
+ __exportStar(__webpack_require__(/*! ./neptune_media_pack */ "./node_modules/@abaplint/core/build/src/objects/neptune_media_pack.js"), exports);
45689
+ __exportStar(__webpack_require__(/*! ./neptune_metadata */ "./node_modules/@abaplint/core/build/src/objects/neptune_metadata.js"), exports);
45690
+ __exportStar(__webpack_require__(/*! ./neptune_mobile_client */ "./node_modules/@abaplint/core/build/src/objects/neptune_mobile_client.js"), exports);
45691
+ __exportStar(__webpack_require__(/*! ./neptune_odata */ "./node_modules/@abaplint/core/build/src/objects/neptune_odata.js"), exports);
45692
+ __exportStar(__webpack_require__(/*! ./neptune_policy */ "./node_modules/@abaplint/core/build/src/objects/neptune_policy.js"), exports);
45693
+ __exportStar(__webpack_require__(/*! ./neptune_rfc_mapping */ "./node_modules/@abaplint/core/build/src/objects/neptune_rfc_mapping.js"), exports);
45694
+ __exportStar(__webpack_require__(/*! ./neptune_rich_text_template */ "./node_modules/@abaplint/core/build/src/objects/neptune_rich_text_template.js"), exports);
45695
+ __exportStar(__webpack_require__(/*! ./neptune_splash_screen */ "./node_modules/@abaplint/core/build/src/objects/neptune_splash_screen.js"), exports);
45696
+ __exportStar(__webpack_require__(/*! ./neptune_sticky_banner */ "./node_modules/@abaplint/core/build/src/objects/neptune_sticky_banner.js"), exports);
45697
+ __exportStar(__webpack_require__(/*! ./neptune_tile_group */ "./node_modules/@abaplint/core/build/src/objects/neptune_tile_group.js"), exports);
45698
+ __exportStar(__webpack_require__(/*! ./neptune_tile_layout */ "./node_modules/@abaplint/core/build/src/objects/neptune_tile_layout.js"), exports);
45699
+ __exportStar(__webpack_require__(/*! ./neptune_tile */ "./node_modules/@abaplint/core/build/src/objects/neptune_tile.js"), exports);
45700
+ __exportStar(__webpack_require__(/*! ./neptune_url_alias */ "./node_modules/@abaplint/core/build/src/objects/neptune_url_alias.js"), exports);
45650
45701
  __exportStar(__webpack_require__(/*! ./number_range */ "./node_modules/@abaplint/core/build/src/objects/number_range.js"), exports);
45651
45702
  __exportStar(__webpack_require__(/*! ./oauth2_profile */ "./node_modules/@abaplint/core/build/src/objects/oauth2_profile.js"), exports);
45652
45703
  __exportStar(__webpack_require__(/*! ./object_characteristic */ "./node_modules/@abaplint/core/build/src/objects/object_characteristic.js"), exports);
@@ -45671,6 +45722,7 @@ __exportStar(__webpack_require__(/*! ./service_definition */ "./node_modules/@ab
45671
45722
  __exportStar(__webpack_require__(/*! ./shared_memory */ "./node_modules/@abaplint/core/build/src/objects/shared_memory.js"), exports);
45672
45723
  __exportStar(__webpack_require__(/*! ./smart_form */ "./node_modules/@abaplint/core/build/src/objects/smart_form.js"), exports);
45673
45724
  __exportStar(__webpack_require__(/*! ./smart_style */ "./node_modules/@abaplint/core/build/src/objects/smart_style.js"), exports);
45725
+ __exportStar(__webpack_require__(/*! ./standard_task */ "./node_modules/@abaplint/core/build/src/objects/standard_task.js"), exports);
45674
45726
  __exportStar(__webpack_require__(/*! ./switch_assignment_hierarchy */ "./node_modules/@abaplint/core/build/src/objects/switch_assignment_hierarchy.js"), exports);
45675
45727
  __exportStar(__webpack_require__(/*! ./switch_assignments */ "./node_modules/@abaplint/core/build/src/objects/switch_assignments.js"), exports);
45676
45728
  __exportStar(__webpack_require__(/*! ./table_type */ "./node_modules/@abaplint/core/build/src/objects/table_type.js"), exports);
@@ -45688,29 +45740,6 @@ __exportStar(__webpack_require__(/*! ./web_dynpro_application */ "./node_modules
45688
45740
  __exportStar(__webpack_require__(/*! ./web_dynpro_component_configuration */ "./node_modules/@abaplint/core/build/src/objects/web_dynpro_component_configuration.js"), exports);
45689
45741
  __exportStar(__webpack_require__(/*! ./web_dynpro_component */ "./node_modules/@abaplint/core/build/src/objects/web_dynpro_component.js"), exports);
45690
45742
  __exportStar(__webpack_require__(/*! ./web_mime */ "./node_modules/@abaplint/core/build/src/objects/web_mime.js"), exports);
45691
- __exportStar(__webpack_require__(/*! ./neptune_metadata */ "./node_modules/@abaplint/core/build/src/objects/neptune_metadata.js"), exports);
45692
- __exportStar(__webpack_require__(/*! ./neptune_app */ "./node_modules/@abaplint/core/build/src/objects/neptune_app.js"), exports);
45693
- __exportStar(__webpack_require__(/*! ./neptune_api */ "./node_modules/@abaplint/core/build/src/objects/neptune_api.js"), exports);
45694
- __exportStar(__webpack_require__(/*! ./neptune_launchpad */ "./node_modules/@abaplint/core/build/src/objects/neptune_launchpad.js"), exports);
45695
- __exportStar(__webpack_require__(/*! ./neptune_tile_group */ "./node_modules/@abaplint/core/build/src/objects/neptune_tile_group.js"), exports);
45696
- __exportStar(__webpack_require__(/*! ./neptune_tile */ "./node_modules/@abaplint/core/build/src/objects/neptune_tile.js"), exports);
45697
- __exportStar(__webpack_require__(/*! ./neptune_policy */ "./node_modules/@abaplint/core/build/src/objects/neptune_policy.js"), exports);
45698
- __exportStar(__webpack_require__(/*! ./neptune_launchpad_layout */ "./node_modules/@abaplint/core/build/src/objects/neptune_launchpad_layout.js"), exports);
45699
- __exportStar(__webpack_require__(/*! ./neptune_tile_layout */ "./node_modules/@abaplint/core/build/src/objects/neptune_tile_layout.js"), exports);
45700
- __exportStar(__webpack_require__(/*! ./neptune_enhancement */ "./node_modules/@abaplint/core/build/src/objects/neptune_enhancement.js"), exports);
45701
- __exportStar(__webpack_require__(/*! ./neptune_login_page */ "./node_modules/@abaplint/core/build/src/objects/neptune_login_page.js"), exports);
45702
- __exportStar(__webpack_require__(/*! ./neptune_sticky_banner */ "./node_modules/@abaplint/core/build/src/objects/neptune_sticky_banner.js"), exports);
45703
- __exportStar(__webpack_require__(/*! ./neptune_splash_screen */ "./node_modules/@abaplint/core/build/src/objects/neptune_splash_screen.js"), exports);
45704
- __exportStar(__webpack_require__(/*! ./neptune_custom_color */ "./node_modules/@abaplint/core/build/src/objects/neptune_custom_color.js"), exports);
45705
- __exportStar(__webpack_require__(/*! ./neptune_rich_text_template */ "./node_modules/@abaplint/core/build/src/objects/neptune_rich_text_template.js"), exports);
45706
- __exportStar(__webpack_require__(/*! ./neptune_custom_js_helper */ "./node_modules/@abaplint/core/build/src/objects/neptune_custom_js_helper.js"), exports);
45707
- __exportStar(__webpack_require__(/*! ./neptune_documentation */ "./node_modules/@abaplint/core/build/src/objects/neptune_documentation.js"), exports);
45708
- __exportStar(__webpack_require__(/*! ./neptune_rfc_mapping */ "./node_modules/@abaplint/core/build/src/objects/neptune_rfc_mapping.js"), exports);
45709
- __exportStar(__webpack_require__(/*! ./neptune_media_library */ "./node_modules/@abaplint/core/build/src/objects/neptune_media_library.js"), exports);
45710
- __exportStar(__webpack_require__(/*! ./neptune_media_pack */ "./node_modules/@abaplint/core/build/src/objects/neptune_media_pack.js"), exports);
45711
- __exportStar(__webpack_require__(/*! ./neptune_url_alias */ "./node_modules/@abaplint/core/build/src/objects/neptune_url_alias.js"), exports);
45712
- __exportStar(__webpack_require__(/*! ./neptune_odata */ "./node_modules/@abaplint/core/build/src/objects/neptune_odata.js"), exports);
45713
- __exportStar(__webpack_require__(/*! ./neptune_mobile_client */ "./node_modules/@abaplint/core/build/src/objects/neptune_mobile_client.js"), exports);
45714
45743
  //# sourceMappingURL=index.js.map
45715
45744
 
45716
45745
  /***/ }),
@@ -46248,8 +46277,9 @@ class NeptuneAPI extends _abstract_object_1.AbstractObject {
46248
46277
  }
46249
46278
  getAllowedNaming() {
46250
46279
  return {
46251
- maxLength: 30,
46280
+ maxLength: 100,
46252
46281
  allowNamespace: true,
46282
+ customRegex: /.*/i,
46253
46283
  };
46254
46284
  }
46255
46285
  getDescription() {
@@ -48415,6 +48445,37 @@ exports.SmartStyle = SmartStyle;
48415
48445
 
48416
48446
  /***/ }),
48417
48447
 
48448
+ /***/ "./node_modules/@abaplint/core/build/src/objects/standard_task.js":
48449
+ /*!************************************************************************!*\
48450
+ !*** ./node_modules/@abaplint/core/build/src/objects/standard_task.js ***!
48451
+ \************************************************************************/
48452
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
48453
+
48454
+ "use strict";
48455
+
48456
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
48457
+ exports.StandardTask = void 0;
48458
+ const _abstract_object_1 = __webpack_require__(/*! ./_abstract_object */ "./node_modules/@abaplint/core/build/src/objects/_abstract_object.js");
48459
+ class StandardTask extends _abstract_object_1.AbstractObject {
48460
+ getType() {
48461
+ return "PDTS";
48462
+ }
48463
+ getAllowedNaming() {
48464
+ return {
48465
+ maxLength: 30,
48466
+ allowNamespace: true,
48467
+ };
48468
+ }
48469
+ getDescription() {
48470
+ // todo
48471
+ return undefined;
48472
+ }
48473
+ }
48474
+ exports.StandardTask = StandardTask;
48475
+ //# sourceMappingURL=standard_task.js.map
48476
+
48477
+ /***/ }),
48478
+
48418
48479
  /***/ "./node_modules/@abaplint/core/build/src/objects/switch_assignment_hierarchy.js":
48419
48480
  /*!**************************************************************************************!*\
48420
48481
  !*** ./node_modules/@abaplint/core/build/src/objects/switch_assignment_hierarchy.js ***!
@@ -49994,7 +50055,7 @@ class Registry {
49994
50055
  }
49995
50056
  static abaplintVersion() {
49996
50057
  // magic, see build script "version.sh"
49997
- return "2.105.2";
50058
+ return "2.105.6";
49998
50059
  }
49999
50060
  getDDICReferences() {
50000
50061
  return this.ddicReferences;
@@ -50502,6 +50563,8 @@ class AbapdocConf extends _basic_rule_config_1.BasicRuleConfig {
50502
50563
  this.checkLocal = false;
50503
50564
  this.classDefinition = false;
50504
50565
  this.interfaceDefinition = false;
50566
+ /** Ignores classes flagged as FOR TESTING */
50567
+ this.ignoreTestClasses = true;
50505
50568
  }
50506
50569
  }
50507
50570
  exports.AbapdocConf = AbapdocConf;
@@ -50541,8 +50604,11 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-on
50541
50604
  if (this.conf.checkLocal === false && classDef.isLocal === true) {
50542
50605
  continue;
50543
50606
  }
50607
+ if (this.conf.ignoreTestClasses === true && classDef.isForTesting === true) {
50608
+ continue;
50609
+ }
50544
50610
  methods = methods.concat(classDef.methods.filter(m => m.visibility === visibility_1.Visibility.Public));
50545
- if (this.getConfig().classDefinition === true) {
50611
+ if (this.conf.classDefinition === true) {
50546
50612
  const previousRow = classDef.identifier.getStart().getRow() - 2;
50547
50613
  if (((_a = rows[previousRow]) === null || _a === void 0 ? void 0 : _a.trim().substring(0, 2)) !== "\"!") {
50548
50614
  const message = "Missing ABAP Doc for class " + classDef.identifier.getToken().getStr();
@@ -50556,7 +50622,7 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#abap-doc-on
50556
50622
  continue;
50557
50623
  }
50558
50624
  methods = methods.concat(interfaceDef.methods);
50559
- if (this.getConfig().interfaceDefinition === true) {
50625
+ if (this.conf.interfaceDefinition === true) {
50560
50626
  const previousRow = interfaceDef.identifier.getStart().getRow() - 2;
50561
50627
  if (((_b = rows[previousRow]) === null || _b === void 0 ? void 0 : _b.trim().substring(0, 2)) !== "\"!") {
50562
50628
  const message = "Missing ABAP Doc for interface " + interfaceDef.identifier.getToken().getStr();
@@ -51020,6 +51086,7 @@ exports.AllowedObjectNaming = exports.AllowedObjectNamingConf = void 0;
51020
51086
  const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
51021
51087
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
51022
51088
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
51089
+ const NAME_REGEX = /^(\/[A-Z_\d]{3,8}\/)?[A-Z_\d<> ]+$/i;
51023
51090
  class AllowedObjectNamingConf extends _basic_rule_config_1.BasicRuleConfig {
51024
51091
  }
51025
51092
  exports.AllowedObjectNamingConf = AllowedObjectNamingConf;
@@ -51059,7 +51126,7 @@ class AllowedObjectNaming {
51059
51126
  message = "Name not allowed";
51060
51127
  }
51061
51128
  }
51062
- else if (name.match(/^(\/[A-Z_\d]{3,8}\/)?[A-Z_\d<> ]+$/i) === null) {
51129
+ else if (name.match(NAME_REGEX) === null) {
51063
51130
  message = "Name not allowed";
51064
51131
  }
51065
51132
  if (message.length > 0) {
@@ -51290,7 +51357,9 @@ STATICS: use CLASS-DATA instead
51290
51357
 
51291
51358
  DESCRIBE TABLE LINES: use lines() instead (quickfix exists)
51292
51359
 
51293
- TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround`,
51360
+ TEST-SEAMS: https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#use-test-seams-as-temporary-workaround
51361
+
51362
+ BREAK points`,
51294
51363
  tags: [_irule_1.RuleTag.Styleguide, _irule_1.RuleTag.SingleFile],
51295
51364
  };
51296
51365
  }
@@ -59194,8 +59263,8 @@ class Conditions {
59194
59263
  push(e) {
59195
59264
  this.arr.push(e.concatTokens());
59196
59265
  }
59197
- hasDuplicates() {
59198
- return this.arr.some(x => this.arr.indexOf(x) !== this.arr.lastIndexOf(x));
59266
+ findFirstDuplicate() {
59267
+ return this.arr.find(x => this.arr.indexOf(x) !== this.arr.lastIndexOf(x));
59199
59268
  }
59200
59269
  }
59201
59270
  class IdenticalConditionsConf extends _basic_rule_config_1.BasicRuleConfig {
@@ -59254,8 +59323,9 @@ Prerequsites: code is pretty printed with identical cAsE`,
59254
59323
  return [];
59255
59324
  }
59256
59325
  }
59257
- if (conditions.hasDuplicates()) {
59258
- const message = "Identical conditions";
59326
+ const duplicate = conditions.findFirstDuplicate();
59327
+ if (duplicate) {
59328
+ const message = "Identical conditions: " + duplicate;
59259
59329
  const issue = issue_1.Issue.atToken(file, node.getFirstToken(), message, this.getMetadata().key, this.conf.severity);
59260
59330
  return [issue];
59261
59331
  }
@@ -59278,8 +59348,9 @@ Prerequsites: code is pretty printed with identical cAsE`,
59278
59348
  conditions.push(c);
59279
59349
  }
59280
59350
  }
59281
- if (conditions.hasDuplicates()) {
59282
- const message = "Identical conditions";
59351
+ const duplicate = conditions.findFirstDuplicate();
59352
+ if (duplicate) {
59353
+ const message = "Identical conditions: " + duplicate;
59283
59354
  const issue = issue_1.Issue.atStatement(file, i, message, this.getMetadata().key, this.conf.severity);
59284
59355
  return [issue];
59285
59356
  }
@@ -59300,8 +59371,9 @@ Prerequsites: code is pretty printed with identical cAsE`,
59300
59371
  conditions.push(s);
59301
59372
  }
59302
59373
  }
59303
- if (conditions.hasDuplicates()) {
59304
- const message = "Identical conditions";
59374
+ const duplicate = conditions.findFirstDuplicate();
59375
+ if (duplicate) {
59376
+ const message = "Identical conditions: " + duplicate;
59305
59377
  const issue = issue_1.Issue.atStatement(file, i, message, this.getMetadata().key, this.conf.severity);
59306
59378
  return [issue];
59307
59379
  }
@@ -63545,17 +63617,17 @@ class NoPrefixesConf extends _basic_rule_config_1.BasicRuleConfig {
63545
63617
  constructor() {
63546
63618
  super(...arguments);
63547
63619
  /** DATA, CLASS-DATA, DATA BEGIN OF, CLASS-DATA BEGIN OF, FINAL(), DATA(), case insensitive regex */
63548
- this.data = "^[lg]._";
63620
+ this.data = "^[lg].?_";
63549
63621
  /** STATICS, STATICS BEGIN OF, case insensitive regex */
63550
63622
  this.statics = "";
63551
63623
  /** FIELD-SYMBOLS and inline FIELD-SYMBOLS(), case insensitive regex */
63552
- this.fieldSymbols = "^<l._";
63624
+ this.fieldSymbols = "^<l.?_";
63553
63625
  /** CONSTANTS, CONSTANTS BEGIN OF, case insensitive regex */
63554
63626
  this.constants = "^[lg]c_";
63555
63627
  /** TYPES, ENUM, MESH, case insensitive regex */
63556
63628
  this.types = "^ty_";
63557
63629
  /** importing, exporting, returning and changing parameters, case insensitive regex */
63558
- this.methodParameters = "^[ierc]._";
63630
+ this.methodParameters = "^[ierc].?_";
63559
63631
  // todo, public localClass: string = "";
63560
63632
  // todo, public localInterface: string = "";
63561
63633
  // todo, public functionModuleParameters: string = "";
@@ -63577,6 +63649,9 @@ class NoPrefixes extends _abap_rule_1.ABAPRule {
63577
63649
  title: "No Prefixes",
63578
63650
  shortDescription: `Dont use hungarian notation`,
63579
63651
  extendedInformation: `
63652
+ Note: not prefixing TYPES will require changing the errorNamespace in the abaplint configuration,
63653
+ allowing all types to become voided, abaplint will then provide less precise syntax errors.
63654
+
63580
63655
  https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#avoid-encodings-esp-hungarian-notation-and-prefixes
63581
63656
 
63582
63657
  https://github.com/SAP/styleguides/blob/main/clean-abap/sub-sections/AvoidEncodings.md`,
@@ -66382,6 +66457,7 @@ const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@ab
66382
66457
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
66383
66458
  const Statements = __webpack_require__(/*! ../abap/2_statements/statements */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/index.js");
66384
66459
  const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
66460
+ const _statement_1 = __webpack_require__(/*! ../abap/2_statements/statements/_statement */ "./node_modules/@abaplint/core/build/src/abap/2_statements/statements/_statement.js");
66385
66461
  class ReduceProceduralCodeConf extends _basic_rule_config_1.BasicRuleConfig {
66386
66462
  constructor() {
66387
66463
  super(...arguments);
@@ -66401,7 +66477,9 @@ class ReduceProceduralCode extends _abap_rule_1.ABAPRule {
66401
66477
  shortDescription: `Checks FORM and FUNCTION-MODULE have few statements`,
66402
66478
  extendedInformation: `Delegate logic to a class method instead of using FORM or FUNCTION-MODULE.
66403
66479
 
66404
- https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming`,
66480
+ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#prefer-object-orientation-to-procedural-programming
66481
+
66482
+ Comments are not counted as statements.`,
66405
66483
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Styleguide],
66406
66484
  badExample: `FORM foo.
66407
66485
  DATA lv_bar TYPE i.
@@ -66447,6 +66525,9 @@ ENDFORM.`,
66447
66525
  }
66448
66526
  doCount = undefined;
66449
66527
  }
66528
+ else if (statement.get() instanceof _statement_1.Comment) {
66529
+ continue;
66530
+ }
66450
66531
  else if (doCount !== undefined) {
66451
66532
  count = count + 1;
66452
66533
  }
@@ -69295,7 +69376,8 @@ class UnknownTypes {
69295
69376
  }
69296
69377
  }
69297
69378
  }
69298
- for (const v of nodeData.idefs) {
69379
+ for (const name in nodeData.idefs) {
69380
+ const v = nodeData.idefs[name];
69299
69381
  const found = this.checkParameters(v);
69300
69382
  if (found) {
69301
69383
  const message = "Contains unknown, " + found.found;