@abaplint/transpiler-cli 2.7.22 → 2.7.24

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 +539 -255
  2. package/package.json +5 -5
package/build/bundle.js CHANGED
@@ -13758,7 +13758,7 @@ class ReadTable {
13758
13758
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
13759
13759
  const fields = (0, combi_1.plus)((0, combi_1.alt)((0, combi_1.seq)("INTO", (0, combi_1.failStar)()), expressions_1.FieldSub));
13760
13760
  const perm = (0, combi_1.per)((0, combi_1.alt)(index, key, from), expressions_1.ReadTableTarget, using, comparing, "CASTING", "TRANSPORTING ALL FIELDS", (0, combi_1.seq)("TRANSPORTING", (0, combi_1.altPrio)(expressions_1.Dynamic, fields)), "BINARY SEARCH");
13761
- return (0, combi_1.seq)("READ TABLE", (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source), expressions_1.SimpleSource2), (0, combi_1.opt)(perm));
13761
+ return (0, combi_1.seq)("READ TABLE", (0, combi_1.alt)(expressions_1.SimpleSource2, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source)), (0, combi_1.opt)(perm));
13762
13762
  }
13763
13763
  }
13764
13764
  exports.ReadTable = ReadTable;
@@ -18425,14 +18425,14 @@ class BuiltIn {
18425
18425
  ret.push(this.buildConstant("abap_undefined", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'-'"));
18426
18426
  ret.push(this.buildConstant("abap_off", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '"));
18427
18427
  ret.push(this.buildConstant("abap_on", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'"));
18428
- ret.push(this.buildConstant("col_background", new basic_1.IntegerType(), "0"));
18429
- ret.push(this.buildConstant("col_heading", new basic_1.IntegerType(), "1"));
18430
- ret.push(this.buildConstant("col_key", new basic_1.IntegerType(), "4"));
18431
- ret.push(this.buildConstant("col_negative", new basic_1.IntegerType(), "6"));
18432
- ret.push(this.buildConstant("col_group", new basic_1.IntegerType(), "7"));
18433
- ret.push(this.buildConstant("col_normal", new basic_1.IntegerType(), "2"));
18434
- ret.push(this.buildConstant("col_positive", new basic_1.IntegerType(), "5"));
18435
- ret.push(this.buildConstant("col_total", new basic_1.IntegerType(), "3"));
18428
+ ret.push(this.buildConstant("col_background", basic_1.IntegerType.get(), "0"));
18429
+ ret.push(this.buildConstant("col_heading", basic_1.IntegerType.get(), "1"));
18430
+ ret.push(this.buildConstant("col_key", basic_1.IntegerType.get(), "4"));
18431
+ ret.push(this.buildConstant("col_negative", basic_1.IntegerType.get(), "6"));
18432
+ ret.push(this.buildConstant("col_group", basic_1.IntegerType.get(), "7"));
18433
+ ret.push(this.buildConstant("col_normal", basic_1.IntegerType.get(), "2"));
18434
+ ret.push(this.buildConstant("col_positive", basic_1.IntegerType.get(), "5"));
18435
+ ret.push(this.buildConstant("col_total", basic_1.IntegerType.get(), "3"));
18436
18436
  ret.push(this.buildConstant("space", new basic_1.CharacterType(1, { derivedFromConstant: true }), "' '"));
18437
18437
  for (const e of extras) {
18438
18438
  const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), e);
@@ -18444,50 +18444,50 @@ class BuiltIn {
18444
18444
  buildSY() {
18445
18445
  const components = [];
18446
18446
  // NOTE: fields must be in correct sequence for the syntax check
18447
- components.push({ name: "index", type: new basic_1.IntegerType() });
18448
- components.push({ name: "pagno", type: new basic_1.IntegerType() });
18449
- components.push({ name: "tabix", type: new basic_1.IntegerType() });
18450
- components.push({ name: "tfill", type: new basic_1.IntegerType() });
18451
- components.push({ name: "tlopc", type: new basic_1.IntegerType() });
18452
- components.push({ name: "tmaxl", type: new basic_1.IntegerType() });
18453
- components.push({ name: "toccu", type: new basic_1.IntegerType() });
18454
- components.push({ name: "ttabc", type: new basic_1.IntegerType() });
18455
- components.push({ name: "tstis", type: new basic_1.IntegerType() });
18456
- components.push({ name: "ttabi", type: new basic_1.IntegerType() });
18457
- components.push({ name: "dbcnt", type: new basic_1.IntegerType() });
18458
- components.push({ name: "fdpos", type: new basic_1.IntegerType() });
18459
- components.push({ name: "colno", type: new basic_1.IntegerType() });
18460
- components.push({ name: "linct", type: new basic_1.IntegerType() });
18461
- components.push({ name: "linno", type: new basic_1.IntegerType() });
18462
- components.push({ name: "linsz", type: new basic_1.IntegerType() });
18463
- components.push({ name: "pagct", type: new basic_1.IntegerType() });
18464
- components.push({ name: "macol", type: new basic_1.IntegerType() });
18465
- components.push({ name: "marow", type: new basic_1.IntegerType() });
18466
- components.push({ name: "tleng", type: new basic_1.IntegerType() });
18467
- components.push({ name: "sfoff", type: new basic_1.IntegerType() });
18468
- components.push({ name: "willi", type: new basic_1.IntegerType() });
18469
- components.push({ name: "lilli", type: new basic_1.IntegerType() });
18470
- components.push({ name: "subrc", type: new basic_1.IntegerType() });
18471
- components.push({ name: "fleng", type: new basic_1.IntegerType() });
18472
- components.push({ name: "cucol", type: new basic_1.IntegerType() });
18473
- components.push({ name: "curow", type: new basic_1.IntegerType() });
18474
- components.push({ name: "lsind", type: new basic_1.IntegerType() });
18475
- components.push({ name: "listi", type: new basic_1.IntegerType() });
18476
- components.push({ name: "stepl", type: new basic_1.IntegerType() });
18477
- components.push({ name: "tpagi", type: new basic_1.IntegerType() });
18478
- components.push({ name: "winx1", type: new basic_1.IntegerType() });
18479
- components.push({ name: "winy1", type: new basic_1.IntegerType() });
18480
- components.push({ name: "winx2", type: new basic_1.IntegerType() });
18481
- components.push({ name: "winy2", type: new basic_1.IntegerType() });
18482
- components.push({ name: "winco", type: new basic_1.IntegerType() });
18483
- components.push({ name: "winro", type: new basic_1.IntegerType() });
18484
- components.push({ name: "windi", type: new basic_1.IntegerType() });
18485
- components.push({ name: "srows", type: new basic_1.IntegerType() });
18486
- components.push({ name: "scols", type: new basic_1.IntegerType() });
18487
- components.push({ name: "loopc", type: new basic_1.IntegerType() });
18488
- components.push({ name: "folen", type: new basic_1.IntegerType() });
18489
- components.push({ name: "fodec", type: new basic_1.IntegerType() });
18490
- components.push({ name: "tzone", type: new basic_1.IntegerType() });
18447
+ components.push({ name: "index", type: basic_1.IntegerType.get() });
18448
+ components.push({ name: "pagno", type: basic_1.IntegerType.get() });
18449
+ components.push({ name: "tabix", type: basic_1.IntegerType.get() });
18450
+ components.push({ name: "tfill", type: basic_1.IntegerType.get() });
18451
+ components.push({ name: "tlopc", type: basic_1.IntegerType.get() });
18452
+ components.push({ name: "tmaxl", type: basic_1.IntegerType.get() });
18453
+ components.push({ name: "toccu", type: basic_1.IntegerType.get() });
18454
+ components.push({ name: "ttabc", type: basic_1.IntegerType.get() });
18455
+ components.push({ name: "tstis", type: basic_1.IntegerType.get() });
18456
+ components.push({ name: "ttabi", type: basic_1.IntegerType.get() });
18457
+ components.push({ name: "dbcnt", type: basic_1.IntegerType.get() });
18458
+ components.push({ name: "fdpos", type: basic_1.IntegerType.get() });
18459
+ components.push({ name: "colno", type: basic_1.IntegerType.get() });
18460
+ components.push({ name: "linct", type: basic_1.IntegerType.get() });
18461
+ components.push({ name: "linno", type: basic_1.IntegerType.get() });
18462
+ components.push({ name: "linsz", type: basic_1.IntegerType.get() });
18463
+ components.push({ name: "pagct", type: basic_1.IntegerType.get() });
18464
+ components.push({ name: "macol", type: basic_1.IntegerType.get() });
18465
+ components.push({ name: "marow", type: basic_1.IntegerType.get() });
18466
+ components.push({ name: "tleng", type: basic_1.IntegerType.get() });
18467
+ components.push({ name: "sfoff", type: basic_1.IntegerType.get() });
18468
+ components.push({ name: "willi", type: basic_1.IntegerType.get() });
18469
+ components.push({ name: "lilli", type: basic_1.IntegerType.get() });
18470
+ components.push({ name: "subrc", type: basic_1.IntegerType.get() });
18471
+ components.push({ name: "fleng", type: basic_1.IntegerType.get() });
18472
+ components.push({ name: "cucol", type: basic_1.IntegerType.get() });
18473
+ components.push({ name: "curow", type: basic_1.IntegerType.get() });
18474
+ components.push({ name: "lsind", type: basic_1.IntegerType.get() });
18475
+ components.push({ name: "listi", type: basic_1.IntegerType.get() });
18476
+ components.push({ name: "stepl", type: basic_1.IntegerType.get() });
18477
+ components.push({ name: "tpagi", type: basic_1.IntegerType.get() });
18478
+ components.push({ name: "winx1", type: basic_1.IntegerType.get() });
18479
+ components.push({ name: "winy1", type: basic_1.IntegerType.get() });
18480
+ components.push({ name: "winx2", type: basic_1.IntegerType.get() });
18481
+ components.push({ name: "winy2", type: basic_1.IntegerType.get() });
18482
+ components.push({ name: "winco", type: basic_1.IntegerType.get() });
18483
+ components.push({ name: "winro", type: basic_1.IntegerType.get() });
18484
+ components.push({ name: "windi", type: basic_1.IntegerType.get() });
18485
+ components.push({ name: "srows", type: basic_1.IntegerType.get() });
18486
+ components.push({ name: "scols", type: basic_1.IntegerType.get() });
18487
+ components.push({ name: "loopc", type: basic_1.IntegerType.get() });
18488
+ components.push({ name: "folen", type: basic_1.IntegerType.get() });
18489
+ components.push({ name: "fodec", type: basic_1.IntegerType.get() });
18490
+ components.push({ name: "tzone", type: basic_1.IntegerType.get() });
18491
18491
  components.push({ name: "dayst", type: new basic_1.CharacterType(1) });
18492
18492
  components.push({ name: "ftype", type: new basic_1.CharacterType(1) });
18493
18493
  components.push({ name: "appli", type: new basic_1.HexType(2) });
@@ -18498,7 +18498,7 @@ class BuiltIn {
18498
18498
  components.push({ name: "ctype", type: new basic_1.CharacterType(1) });
18499
18499
  components.push({ name: "input", type: new basic_1.CharacterType(1, { qualifiedName: "sy-input" }) });
18500
18500
  components.push({ name: "langu", type: new basic_1.CharacterType(1, { qualifiedName: "sy-langu", conversionExit: "ISOLA" }) });
18501
- components.push({ name: "modno", type: new basic_1.IntegerType() });
18501
+ components.push({ name: "modno", type: basic_1.IntegerType.get() });
18502
18502
  components.push({ name: "batch", type: new basic_1.CharacterType(1, { qualifiedName: "sy-batch" }) });
18503
18503
  components.push({ name: "binpt", type: new basic_1.CharacterType(1, { qualifiedName: "sy-binpt" }) });
18504
18504
  components.push({ name: "calld", type: new basic_1.CharacterType(1, { qualifiedName: "sy-calld" }) });
@@ -18508,7 +18508,7 @@ class BuiltIn {
18508
18508
  components.push({ name: "pri40", type: new basic_1.CharacterType(1) });
18509
18509
  components.push({ name: "rstrt", type: new basic_1.CharacterType(1) });
18510
18510
  components.push({ name: "wtitl", type: new basic_1.CharacterType(1, { qualifiedName: "sy-wtitl" }) });
18511
- components.push({ name: "cpage", type: new basic_1.IntegerType() });
18511
+ components.push({ name: "cpage", type: basic_1.IntegerType.get() });
18512
18512
  components.push({ name: "dbnam", type: new basic_1.CharacterType(20, { qualifiedName: "sy-dbnam" }) });
18513
18513
  components.push({ name: "mandt", type: new basic_1.CharacterType(3, { qualifiedName: "sy-mandt" }) });
18514
18514
  components.push({ name: "prefx", type: new basic_1.CharacterType(3) });
@@ -18606,8 +18606,8 @@ class BuiltIn {
18606
18606
  components.push({ name: "oncom", type: new basic_1.CharacterType(1) });
18607
18607
  components.push({ name: "vline", type: new basic_1.CharacterType(1, { qualifiedName: "sy-vline" }) });
18608
18608
  components.push({ name: "winsl", type: new basic_1.CharacterType(79) });
18609
- components.push({ name: "staco", type: new basic_1.IntegerType() });
18610
- components.push({ name: "staro", type: new basic_1.IntegerType() });
18609
+ components.push({ name: "staco", type: basic_1.IntegerType.get() });
18610
+ components.push({ name: "staro", type: basic_1.IntegerType.get() });
18611
18611
  components.push({ name: "datar", type: new basic_1.CharacterType(1, { qualifiedName: "sy-datar" }) });
18612
18612
  components.push({ name: "host", type: new basic_1.CharacterType(32, { qualifiedName: "sy-host" }) });
18613
18613
  components.push({ name: "locdb", type: new basic_1.CharacterType(1) });
@@ -18650,7 +18650,7 @@ BuiltIn.methods = [
18650
18650
  mandatory: {
18651
18651
  "val": new basic_1.FloatType(),
18652
18652
  },
18653
- return: new basic_1.IntegerType(),
18653
+ return: basic_1.IntegerType.get(),
18654
18654
  },
18655
18655
  {
18656
18656
  name: "ACOS",
@@ -18676,7 +18676,7 @@ BuiltIn.methods = [
18676
18676
  {
18677
18677
  name: "BIT-SET",
18678
18678
  mandatory: {
18679
- "val": new basic_1.IntegerType(),
18679
+ "val": basic_1.IntegerType.get(),
18680
18680
  },
18681
18681
  return: new basic_1.XStringType(),
18682
18682
  version: version_1.Version.v702,
@@ -18686,7 +18686,7 @@ BuiltIn.methods = [
18686
18686
  mandatory: {
18687
18687
  "val": new basic_1.CLikeType(),
18688
18688
  },
18689
- return: new basic_1.StringType(),
18689
+ return: basic_1.StringType.get(),
18690
18690
  version: version_1.Version.v702,
18691
18691
  },
18692
18692
  {
@@ -18695,7 +18695,7 @@ BuiltIn.methods = [
18695
18695
  "bool": new basic_1.CLikeType(),
18696
18696
  },
18697
18697
  optional: {
18698
- "bit": new basic_1.IntegerType(),
18698
+ "bit": basic_1.IntegerType.get(),
18699
18699
  },
18700
18700
  return: new basic_1.XStringType(),
18701
18701
  version: version_1.Version.v702,
@@ -18705,18 +18705,18 @@ BuiltIn.methods = [
18705
18705
  mandatory: {
18706
18706
  "val": new basic_1.FloatType(),
18707
18707
  },
18708
- return: new basic_1.IntegerType(),
18708
+ return: basic_1.IntegerType.get(),
18709
18709
  },
18710
18710
  {
18711
18711
  name: "CHAR_OFF",
18712
18712
  mandatory: {
18713
18713
  "val": new basic_1.CLikeType(),
18714
- "add": new basic_1.IntegerType(),
18714
+ "add": basic_1.IntegerType.get(),
18715
18715
  },
18716
18716
  optional: {
18717
- "off": new basic_1.IntegerType(),
18717
+ "off": basic_1.IntegerType.get(),
18718
18718
  },
18719
- return: new basic_1.IntegerType(),
18719
+ return: basic_1.IntegerType.get(),
18720
18720
  version: version_1.Version.v702,
18721
18721
  },
18722
18722
  {
@@ -18724,7 +18724,7 @@ BuiltIn.methods = [
18724
18724
  mandatory: {
18725
18725
  "val": new basic_1.CLikeType(),
18726
18726
  },
18727
- return: new basic_1.IntegerType(),
18727
+ return: basic_1.IntegerType.get(),
18728
18728
  },
18729
18729
  {
18730
18730
  name: "CMAX",
@@ -18740,7 +18740,7 @@ BuiltIn.methods = [
18740
18740
  "val7": new basic_1.CLikeType(),
18741
18741
  "val9": new basic_1.CLikeType(),
18742
18742
  },
18743
- return: new basic_1.StringType(),
18743
+ return: basic_1.StringType.get(),
18744
18744
  version: version_1.Version.v702,
18745
18745
  },
18746
18746
  {
@@ -18757,7 +18757,7 @@ BuiltIn.methods = [
18757
18757
  "val7": new basic_1.CLikeType(),
18758
18758
  "val9": new basic_1.CLikeType(),
18759
18759
  },
18760
- return: new basic_1.StringType(),
18760
+ return: basic_1.StringType.get(),
18761
18761
  version: version_1.Version.v702,
18762
18762
  },
18763
18763
  {
@@ -18768,7 +18768,7 @@ BuiltIn.methods = [
18768
18768
  optional: {
18769
18769
  "sep": new basic_1.CLikeType(),
18770
18770
  },
18771
- return: new basic_1.StringType(),
18771
+ return: basic_1.StringType.get(),
18772
18772
  version: version_1.Version.v702,
18773
18773
  },
18774
18774
  {
@@ -18781,7 +18781,7 @@ BuiltIn.methods = [
18781
18781
  "from": new basic_1.CLikeType(),
18782
18782
  "to": new basic_1.CLikeType(),
18783
18783
  },
18784
- return: new basic_1.StringType(),
18784
+ return: basic_1.StringType.get(),
18785
18785
  version: version_1.Version.v702,
18786
18786
  },
18787
18787
  {
@@ -18796,9 +18796,9 @@ BuiltIn.methods = [
18796
18796
  "regex": new basic_1.CLikeType(),
18797
18797
  "pcre": new basic_1.CLikeType(),
18798
18798
  "case": new basic_1.CharacterType(1),
18799
- "off": new basic_1.IntegerType(),
18800
- "len": new basic_1.IntegerType(),
18801
- "occ": new basic_1.IntegerType(),
18799
+ "off": basic_1.IntegerType.get(),
18800
+ "len": basic_1.IntegerType.get(),
18801
+ "occ": basic_1.IntegerType.get(),
18802
18802
  },
18803
18803
  return: new basic_1.CharacterType(1),
18804
18804
  predicate: true,
@@ -18813,9 +18813,9 @@ BuiltIn.methods = [
18813
18813
  "sub": new basic_1.CLikeType(),
18814
18814
  "start": new basic_1.CLikeType(),
18815
18815
  "end": new basic_1.CLikeType(),
18816
- "off": new basic_1.IntegerType(),
18817
- "len": new basic_1.IntegerType(),
18818
- "occ": new basic_1.IntegerType(),
18816
+ "off": basic_1.IntegerType.get(),
18817
+ "len": basic_1.IntegerType.get(),
18818
+ "occ": basic_1.IntegerType.get(),
18819
18819
  },
18820
18820
  predicate: true,
18821
18821
  return: new basic_1.CharacterType(1), version: version_1.Version.v702,
@@ -18829,9 +18829,9 @@ BuiltIn.methods = [
18829
18829
  "sub": new basic_1.CLikeType(),
18830
18830
  "start": new basic_1.CLikeType(),
18831
18831
  "end": new basic_1.CLikeType(),
18832
- "off": new basic_1.IntegerType(),
18833
- "len": new basic_1.IntegerType(),
18834
- "occ": new basic_1.IntegerType(),
18832
+ "off": basic_1.IntegerType.get(),
18833
+ "len": basic_1.IntegerType.get(),
18834
+ "occ": basic_1.IntegerType.get(),
18835
18835
  },
18836
18836
  return: new basic_1.CharacterType(1),
18837
18837
  predicate: true,
@@ -18861,10 +18861,10 @@ BuiltIn.methods = [
18861
18861
  "regex": new basic_1.CLikeType(),
18862
18862
  "pcre": new basic_1.CLikeType(),
18863
18863
  "case": new basic_1.CharacterType(1),
18864
- "off": new basic_1.IntegerType(),
18865
- "len": new basic_1.IntegerType(),
18864
+ "off": basic_1.IntegerType.get(),
18865
+ "len": basic_1.IntegerType.get(),
18866
18866
  },
18867
- return: new basic_1.IntegerType(),
18867
+ return: basic_1.IntegerType.get(),
18868
18868
  version: version_1.Version.v702,
18869
18869
  },
18870
18870
  {
@@ -18877,10 +18877,10 @@ BuiltIn.methods = [
18877
18877
  "regex": new basic_1.CLikeType(),
18878
18878
  "pcre": new basic_1.CLikeType(),
18879
18879
  "case": new basic_1.CharacterType(1),
18880
- "off": new basic_1.IntegerType(),
18881
- "len": new basic_1.IntegerType(),
18880
+ "off": basic_1.IntegerType.get(),
18881
+ "len": basic_1.IntegerType.get(),
18882
18882
  },
18883
- return: new basic_1.IntegerType(),
18883
+ return: basic_1.IntegerType.get(),
18884
18884
  version: version_1.Version.v702,
18885
18885
  },
18886
18886
  {
@@ -18893,10 +18893,10 @@ BuiltIn.methods = [
18893
18893
  "regex": new basic_1.CLikeType(),
18894
18894
  "pcre": new basic_1.CLikeType(),
18895
18895
  "case": new basic_1.CharacterType(1),
18896
- "off": new basic_1.IntegerType(),
18897
- "len": new basic_1.IntegerType(),
18896
+ "off": basic_1.IntegerType.get(),
18897
+ "len": basic_1.IntegerType.get(),
18898
18898
  },
18899
- return: new basic_1.IntegerType(),
18899
+ return: basic_1.IntegerType.get(),
18900
18900
  version: version_1.Version.v702,
18901
18901
  },
18902
18902
  {
@@ -18904,7 +18904,7 @@ BuiltIn.methods = [
18904
18904
  mandatory: {
18905
18905
  "val": new basic_1.CLikeType(),
18906
18906
  },
18907
- return: new basic_1.IntegerType(),
18907
+ return: basic_1.IntegerType.get(),
18908
18908
  },
18909
18909
  {
18910
18910
  name: "DISTANCE",
@@ -18912,7 +18912,7 @@ BuiltIn.methods = [
18912
18912
  "val1": new basic_1.CLikeType(),
18913
18913
  "val2": new basic_1.CLikeType(),
18914
18914
  },
18915
- return: new basic_1.IntegerType(),
18915
+ return: basic_1.IntegerType.get(),
18916
18916
  version: version_1.Version.v702,
18917
18917
  },
18918
18918
  {
@@ -18921,7 +18921,7 @@ BuiltIn.methods = [
18921
18921
  "val": new basic_1.CLikeType(),
18922
18922
  "format": new basic_1.CLikeType(),
18923
18923
  },
18924
- return: new basic_1.StringType(),
18924
+ return: basic_1.StringType.get(),
18925
18925
  version: version_1.Version.v702,
18926
18926
  },
18927
18927
  {
@@ -18941,11 +18941,11 @@ BuiltIn.methods = [
18941
18941
  "regex": new basic_1.CLikeType(),
18942
18942
  "pcre": new basic_1.CLikeType(),
18943
18943
  "case": new basic_1.CharacterType(1),
18944
- "off": new basic_1.IntegerType(),
18945
- "len": new basic_1.IntegerType(),
18946
- "occ": new basic_1.IntegerType(),
18944
+ "off": basic_1.IntegerType.get(),
18945
+ "len": basic_1.IntegerType.get(),
18946
+ "occ": basic_1.IntegerType.get(),
18947
18947
  },
18948
- return: new basic_1.IntegerType(),
18948
+ return: basic_1.IntegerType.get(),
18949
18949
  version: version_1.Version.v702,
18950
18950
  },
18951
18951
  {
@@ -18955,11 +18955,11 @@ BuiltIn.methods = [
18955
18955
  },
18956
18956
  optional: {
18957
18957
  "sub": new basic_1.CLikeType(),
18958
- "off": new basic_1.IntegerType(),
18959
- "len": new basic_1.IntegerType(),
18960
- "occ": new basic_1.IntegerType(),
18958
+ "off": basic_1.IntegerType.get(),
18959
+ "len": basic_1.IntegerType.get(),
18960
+ "occ": basic_1.IntegerType.get(),
18961
18961
  },
18962
- return: new basic_1.IntegerType(),
18962
+ return: basic_1.IntegerType.get(),
18963
18963
  version: version_1.Version.v702,
18964
18964
  },
18965
18965
  {
@@ -18969,11 +18969,11 @@ BuiltIn.methods = [
18969
18969
  },
18970
18970
  optional: {
18971
18971
  "sub": new basic_1.CLikeType(),
18972
- "off": new basic_1.IntegerType(),
18973
- "len": new basic_1.IntegerType(),
18974
- "occ": new basic_1.IntegerType(),
18972
+ "off": basic_1.IntegerType.get(),
18973
+ "len": basic_1.IntegerType.get(),
18974
+ "occ": basic_1.IntegerType.get(),
18975
18975
  },
18976
- return: new basic_1.IntegerType(),
18976
+ return: basic_1.IntegerType.get(),
18977
18977
  version: version_1.Version.v702,
18978
18978
  },
18979
18979
  {
@@ -18986,11 +18986,11 @@ BuiltIn.methods = [
18986
18986
  "regex": new basic_1.CLikeType(),
18987
18987
  "pcre": new basic_1.CLikeType(),
18988
18988
  "case": new basic_1.CharacterType(1),
18989
- "off": new basic_1.IntegerType(),
18990
- "len": new basic_1.IntegerType(),
18991
- "occ": new basic_1.IntegerType(),
18989
+ "off": basic_1.IntegerType.get(),
18990
+ "len": basic_1.IntegerType.get(),
18991
+ "occ": basic_1.IntegerType.get(),
18992
18992
  },
18993
- return: new basic_1.IntegerType(),
18993
+ return: basic_1.IntegerType.get(),
18994
18994
  version: version_1.Version.v702,
18995
18995
  },
18996
18996
  {
@@ -18998,14 +18998,14 @@ BuiltIn.methods = [
18998
18998
  mandatory: {
18999
18999
  "val": new basic_1.FloatType(),
19000
19000
  },
19001
- return: new basic_1.IntegerType(),
19001
+ return: basic_1.IntegerType.get(),
19002
19002
  },
19003
19003
  {
19004
19004
  name: "FRAC",
19005
19005
  mandatory: {
19006
19006
  "val": new basic_1.FloatType(),
19007
19007
  },
19008
- return: new basic_1.IntegerType(),
19008
+ return: basic_1.IntegerType.get(),
19009
19009
  },
19010
19010
  {
19011
19011
  name: "FROM_MIXED",
@@ -19014,10 +19014,10 @@ BuiltIn.methods = [
19014
19014
  },
19015
19015
  optional: {
19016
19016
  "case": new basic_1.CharacterType(1),
19017
- "sep": new basic_1.IntegerType(),
19018
- "min": new basic_1.IntegerType(),
19017
+ "sep": basic_1.IntegerType.get(),
19018
+ "min": basic_1.IntegerType.get(),
19019
19019
  },
19020
- return: new basic_1.StringType(),
19020
+ return: basic_1.StringType.get(),
19021
19021
  version: version_1.Version.v702,
19022
19022
  },
19023
19023
  {
@@ -19027,9 +19027,9 @@ BuiltIn.methods = [
19027
19027
  "sub": new basic_1.CLikeType(),
19028
19028
  },
19029
19029
  optional: {
19030
- "off": new basic_1.IntegerType(),
19030
+ "off": basic_1.IntegerType.get(),
19031
19031
  },
19032
- return: new basic_1.StringType(),
19032
+ return: basic_1.StringType.get(),
19033
19033
  version: version_1.Version.v702,
19034
19034
  },
19035
19035
  {
@@ -19038,7 +19038,7 @@ BuiltIn.methods = [
19038
19038
  "base": new basic_1.FloatType(),
19039
19039
  "exp": new basic_1.FloatType(),
19040
19040
  },
19041
- return: new basic_1.IntegerType(),
19041
+ return: basic_1.IntegerType.get(),
19042
19042
  version: version_1.Version.v740sp02,
19043
19043
  },
19044
19044
  {
@@ -19055,7 +19055,7 @@ BuiltIn.methods = [
19055
19055
  mandatory: {
19056
19056
  "val": new basic_1.CLikeType(),
19057
19057
  },
19058
- return: new basic_1.IntegerType(),
19058
+ return: basic_1.IntegerType.get(),
19059
19059
  version: version_1.Version.v740sp02,
19060
19060
  },
19061
19061
  {
@@ -19063,7 +19063,7 @@ BuiltIn.methods = [
19063
19063
  mandatory: {
19064
19064
  "val": new basic_1.TableType(new basic_1.AnyType(), { withHeader: false, keyType: basic_1.TableKeyType.default }),
19065
19065
  },
19066
- return: new basic_1.IntegerType(),
19066
+ return: basic_1.IntegerType.get(),
19067
19067
  },
19068
19068
  {
19069
19069
  name: "LOG",
@@ -19087,9 +19087,9 @@ BuiltIn.methods = [
19087
19087
  "case": new basic_1.CharacterType(1),
19088
19088
  "regex": new basic_1.CLikeType(),
19089
19089
  "pcre": new basic_1.CLikeType(),
19090
- "occ": new basic_1.IntegerType(),
19090
+ "occ": basic_1.IntegerType.get(),
19091
19091
  },
19092
- return: new basic_1.StringType(),
19092
+ return: basic_1.StringType.get(),
19093
19093
  version: version_1.Version.v702,
19094
19094
  },
19095
19095
  {
@@ -19101,8 +19101,8 @@ BuiltIn.methods = [
19101
19101
  "case": new basic_1.CharacterType(1),
19102
19102
  "regex": new basic_1.CLikeType(),
19103
19103
  "pcre": new basic_1.CLikeType(),
19104
- "off": new basic_1.IntegerType(),
19105
- "len": new basic_1.IntegerType(),
19104
+ "off": basic_1.IntegerType.get(),
19105
+ "len": basic_1.IntegerType.get(),
19106
19106
  },
19107
19107
  return: new basic_1.CharacterType(1),
19108
19108
  predicate: true,
@@ -19123,7 +19123,7 @@ BuiltIn.methods = [
19123
19123
  "val8": new basic_1.CLikeType(),
19124
19124
  "val9": new basic_1.CLikeType(),
19125
19125
  },
19126
- return: new basic_1.IntegerType(),
19126
+ return: basic_1.IntegerType.get(),
19127
19127
  version: version_1.Version.v702,
19128
19128
  },
19129
19129
  {
@@ -19141,7 +19141,7 @@ BuiltIn.methods = [
19141
19141
  "val8": new basic_1.CLikeType(),
19142
19142
  "val9": new basic_1.CLikeType(),
19143
19143
  },
19144
- return: new basic_1.IntegerType(),
19144
+ return: basic_1.IntegerType.get(),
19145
19145
  version: version_1.Version.v702,
19146
19146
  },
19147
19147
  {
@@ -19149,15 +19149,15 @@ BuiltIn.methods = [
19149
19149
  mandatory: {
19150
19150
  "val": new basic_1.CLikeType(),
19151
19151
  },
19152
- return: new basic_1.IntegerType(),
19152
+ return: basic_1.IntegerType.get(),
19153
19153
  },
19154
19154
  {
19155
19155
  name: "REPEAT",
19156
19156
  mandatory: {
19157
19157
  "val": new basic_1.CLikeType(),
19158
- "occ": new basic_1.IntegerType(),
19158
+ "occ": basic_1.IntegerType.get(),
19159
19159
  },
19160
- return: new basic_1.StringType(),
19160
+ return: basic_1.StringType.get(),
19161
19161
  version: version_1.Version.v702,
19162
19162
  },
19163
19163
  {
@@ -19171,11 +19171,11 @@ BuiltIn.methods = [
19171
19171
  "regex": new basic_1.CLikeType(),
19172
19172
  "pcre": new basic_1.CLikeType(),
19173
19173
  "case": new basic_1.CharacterType(1),
19174
- "off": new basic_1.IntegerType(),
19175
- "len": new basic_1.IntegerType(),
19176
- "occ": new basic_1.IntegerType(),
19174
+ "off": basic_1.IntegerType.get(),
19175
+ "len": basic_1.IntegerType.get(),
19176
+ "occ": basic_1.IntegerType.get(),
19177
19177
  },
19178
- return: new basic_1.StringType(),
19178
+ return: basic_1.StringType.get(),
19179
19179
  version: version_1.Version.v702,
19180
19180
  },
19181
19181
  {
@@ -19184,9 +19184,9 @@ BuiltIn.methods = [
19184
19184
  "val": new basic_1.FloatType(),
19185
19185
  },
19186
19186
  optional: {
19187
- "dec": new basic_1.IntegerType(),
19188
- "prec": new basic_1.IntegerType(),
19189
- "mode": new basic_1.IntegerType(),
19187
+ "dec": basic_1.IntegerType.get(),
19188
+ "prec": basic_1.IntegerType.get(),
19189
+ "mode": basic_1.IntegerType.get(),
19190
19190
  },
19191
19191
  return: new basic_1.FloatType(),
19192
19192
  version: version_1.Version.v702,
@@ -19196,7 +19196,7 @@ BuiltIn.methods = [
19196
19196
  mandatory: {
19197
19197
  "val": new basic_1.CLikeType(),
19198
19198
  },
19199
- return: new basic_1.StringType(),
19199
+ return: basic_1.StringType.get(),
19200
19200
  version: version_1.Version.v702,
19201
19201
  },
19202
19202
  {
@@ -19205,24 +19205,24 @@ BuiltIn.methods = [
19205
19205
  "val": new basic_1.FloatType(),
19206
19206
  },
19207
19207
  optional: {
19208
- "dec": new basic_1.IntegerType(),
19209
- "prec": new basic_1.IntegerType(),
19210
- "mode": new basic_1.IntegerType(),
19208
+ "dec": basic_1.IntegerType.get(),
19209
+ "prec": basic_1.IntegerType.get(),
19210
+ "mode": basic_1.IntegerType.get(),
19211
19211
  },
19212
- return: new basic_1.IntegerType(),
19212
+ return: basic_1.IntegerType.get(),
19213
19213
  version: version_1.Version.v702,
19214
19214
  },
19215
19215
  {
19216
19216
  name: "SEGMENT",
19217
19217
  mandatory: {
19218
19218
  "val": new basic_1.CLikeType(),
19219
- "index": new basic_1.IntegerType(),
19219
+ "index": basic_1.IntegerType.get(),
19220
19220
  },
19221
19221
  optional: {
19222
19222
  "sep": new basic_1.CLikeType(),
19223
19223
  "space": new basic_1.CLikeType(),
19224
19224
  },
19225
- return: new basic_1.StringType(),
19225
+ return: basic_1.StringType.get(),
19226
19226
  version: version_1.Version.v702,
19227
19227
  },
19228
19228
  {
@@ -19232,10 +19232,10 @@ BuiltIn.methods = [
19232
19232
  },
19233
19233
  optional: {
19234
19234
  "sub": new basic_1.CLikeType(),
19235
- "places": new basic_1.IntegerType(),
19236
- "circular": new basic_1.IntegerType(),
19235
+ "places": basic_1.IntegerType.get(),
19236
+ "circular": basic_1.IntegerType.get(),
19237
19237
  },
19238
- return: new basic_1.StringType(),
19238
+ return: basic_1.StringType.get(),
19239
19239
  version: version_1.Version.v702,
19240
19240
  },
19241
19241
  {
@@ -19245,10 +19245,10 @@ BuiltIn.methods = [
19245
19245
  },
19246
19246
  optional: {
19247
19247
  "sub": new basic_1.CLikeType(),
19248
- "places": new basic_1.IntegerType(),
19249
- "circular": new basic_1.IntegerType(),
19248
+ "places": basic_1.IntegerType.get(),
19249
+ "circular": basic_1.IntegerType.get(),
19250
19250
  },
19251
- return: new basic_1.StringType(),
19251
+ return: basic_1.StringType.get(),
19252
19252
  version: version_1.Version.v702,
19253
19253
  },
19254
19254
  {
@@ -19256,7 +19256,7 @@ BuiltIn.methods = [
19256
19256
  mandatory: {
19257
19257
  "val": new basic_1.FloatType(),
19258
19258
  },
19259
- return: new basic_1.IntegerType(),
19259
+ return: basic_1.IntegerType.get(),
19260
19260
  },
19261
19261
  {
19262
19262
  name: "SIN",
@@ -19284,7 +19284,7 @@ BuiltIn.methods = [
19284
19284
  mandatory: {
19285
19285
  "val": new basic_1.CLikeType(),
19286
19286
  },
19287
- return: new basic_1.IntegerType(),
19287
+ return: basic_1.IntegerType.get(),
19288
19288
  },
19289
19289
  {
19290
19290
  name: "SUBSTRING",
@@ -19292,10 +19292,10 @@ BuiltIn.methods = [
19292
19292
  "val": new basic_1.CLikeType(),
19293
19293
  },
19294
19294
  optional: {
19295
- "off": new basic_1.IntegerType(),
19296
- "len": new basic_1.IntegerType(),
19295
+ "off": basic_1.IntegerType.get(),
19296
+ "len": basic_1.IntegerType.get(),
19297
19297
  },
19298
- return: new basic_1.StringType(),
19298
+ return: basic_1.StringType.get(),
19299
19299
  version: version_1.Version.v702,
19300
19300
  },
19301
19301
  {
@@ -19308,10 +19308,10 @@ BuiltIn.methods = [
19308
19308
  "regex": new basic_1.CLikeType(),
19309
19309
  "pcre": new basic_1.CLikeType(),
19310
19310
  "case": new basic_1.CharacterType(1),
19311
- "len": new basic_1.IntegerType(),
19312
- "occ": new basic_1.IntegerType(),
19311
+ "len": basic_1.IntegerType.get(),
19312
+ "occ": basic_1.IntegerType.get(),
19313
19313
  },
19314
- return: new basic_1.StringType(),
19314
+ return: basic_1.StringType.get(),
19315
19315
  version: version_1.Version.v702,
19316
19316
  },
19317
19317
  {
@@ -19324,10 +19324,10 @@ BuiltIn.methods = [
19324
19324
  "regex": new basic_1.CLikeType(),
19325
19325
  "pcre": new basic_1.CLikeType(),
19326
19326
  "case": new basic_1.CharacterType(1),
19327
- "len": new basic_1.IntegerType(),
19328
- "occ": new basic_1.IntegerType(),
19327
+ "len": basic_1.IntegerType.get(),
19328
+ "occ": basic_1.IntegerType.get(),
19329
19329
  },
19330
- return: new basic_1.StringType(),
19330
+ return: basic_1.StringType.get(),
19331
19331
  version: version_1.Version.v702,
19332
19332
  },
19333
19333
  {
@@ -19340,10 +19340,10 @@ BuiltIn.methods = [
19340
19340
  "regex": new basic_1.CLikeType(),
19341
19341
  "pcre": new basic_1.CLikeType(),
19342
19342
  "case": new basic_1.CharacterType(1),
19343
- "len": new basic_1.IntegerType(),
19344
- "occ": new basic_1.IntegerType(),
19343
+ "len": basic_1.IntegerType.get(),
19344
+ "occ": basic_1.IntegerType.get(),
19345
19345
  },
19346
- return: new basic_1.StringType(),
19346
+ return: basic_1.StringType.get(),
19347
19347
  version: version_1.Version.v702,
19348
19348
  },
19349
19349
  {
@@ -19356,10 +19356,10 @@ BuiltIn.methods = [
19356
19356
  "regex": new basic_1.CLikeType(),
19357
19357
  "pcre": new basic_1.CLikeType(),
19358
19358
  "case": new basic_1.CharacterType(1),
19359
- "len": new basic_1.IntegerType(),
19360
- "occ": new basic_1.IntegerType(),
19359
+ "len": basic_1.IntegerType.get(),
19360
+ "occ": basic_1.IntegerType.get(),
19361
19361
  },
19362
- return: new basic_1.StringType(),
19362
+ return: basic_1.StringType.get(),
19363
19363
  version: version_1.Version.v702,
19364
19364
  },
19365
19365
  {
@@ -19381,7 +19381,7 @@ BuiltIn.methods = [
19381
19381
  mandatory: {
19382
19382
  "val": new basic_1.CLikeType(),
19383
19383
  },
19384
- return: new basic_1.StringType(),
19384
+ return: basic_1.StringType.get(),
19385
19385
  version: version_1.Version.v702,
19386
19386
  },
19387
19387
  {
@@ -19391,16 +19391,16 @@ BuiltIn.methods = [
19391
19391
  },
19392
19392
  optional: {
19393
19393
  "case": new basic_1.CharacterType(1),
19394
- "sep": new basic_1.IntegerType(),
19395
- "min": new basic_1.IntegerType(),
19394
+ "sep": basic_1.IntegerType.get(),
19395
+ "min": basic_1.IntegerType.get(),
19396
19396
  },
19397
- return: new basic_1.StringType(),
19397
+ return: basic_1.StringType.get(),
19398
19398
  version: version_1.Version.v702,
19399
19399
  },
19400
19400
  {
19401
19401
  name: "TO_UPPER",
19402
19402
  mandatory: { "val": new basic_1.CLikeType() },
19403
- return: new basic_1.StringType(),
19403
+ return: basic_1.StringType.get(),
19404
19404
  version: version_1.Version.v702,
19405
19405
  },
19406
19406
  {
@@ -19410,7 +19410,7 @@ BuiltIn.methods = [
19410
19410
  "from": new basic_1.CLikeType(),
19411
19411
  "to": new basic_1.CLikeType(),
19412
19412
  },
19413
- return: new basic_1.StringType(),
19413
+ return: basic_1.StringType.get(),
19414
19414
  version: version_1.Version.v702,
19415
19415
  },
19416
19416
  {
@@ -19418,7 +19418,7 @@ BuiltIn.methods = [
19418
19418
  mandatory: {
19419
19419
  "val": new basic_1.FloatType(),
19420
19420
  },
19421
- return: new basic_1.IntegerType(),
19421
+ return: basic_1.IntegerType.get(),
19422
19422
  },
19423
19423
  {
19424
19424
  name: "UTCLONG_ADD",
@@ -19426,9 +19426,9 @@ BuiltIn.methods = [
19426
19426
  "val": new basic_1.UTCLongType(),
19427
19427
  },
19428
19428
  optional: {
19429
- "days": new basic_1.IntegerType(),
19430
- "hour": new basic_1.IntegerType(),
19431
- "minutes": new basic_1.IntegerType(),
19429
+ "days": basic_1.IntegerType.get(),
19430
+ "hour": basic_1.IntegerType.get(),
19431
+ "minutes": basic_1.IntegerType.get(),
19432
19432
  "seconds": new basic_1.FloatType(),
19433
19433
  },
19434
19434
  return: new basic_1.UTCLongType(),
@@ -19459,9 +19459,9 @@ BuiltIn.methods = [
19459
19459
  {
19460
19460
  name: "XSTRLEN",
19461
19461
  mandatory: {
19462
- "val": new basic_1.XStringType(),
19462
+ "val": new basic_1.XSequenceType(),
19463
19463
  },
19464
- return: new basic_1.IntegerType(),
19464
+ return: basic_1.IntegerType.get(),
19465
19465
  },
19466
19466
  ];
19467
19467
  //# sourceMappingURL=_builtin.js.map
@@ -20561,6 +20561,7 @@ class TypeUtils {
20561
20561
  else if (type instanceof basic_1.XStringType
20562
20562
  || type instanceof basic_1.HexType
20563
20563
  || type instanceof basic_1.VoidType
20564
+ || type instanceof basic_1.XGenericType
20564
20565
  || type instanceof basic_1.XSequenceType
20565
20566
  || type instanceof basic_1.AnyType
20566
20567
  || type instanceof basic_1.UnknownType) {
@@ -20678,7 +20679,7 @@ class TypeUtils {
20678
20679
  return false;
20679
20680
  }
20680
20681
  isAssignableStrict(source, target) {
20681
- var _a, _b, _c, _d, _e;
20682
+ var _a, _b, _c, _d, _e, _f;
20682
20683
  /*
20683
20684
  console.dir(source);
20684
20685
  console.dir(target);
@@ -20717,8 +20718,14 @@ class TypeUtils {
20717
20718
  return false;
20718
20719
  }
20719
20720
  }
20720
- else if (source instanceof basic_1.StringType && target instanceof basic_1.StructureType) {
20721
- if (this.structureContainsString(target)) {
20721
+ else if (source instanceof basic_1.StringType) {
20722
+ if (target instanceof basic_1.StructureType && this.structureContainsString(target)) {
20723
+ return false;
20724
+ }
20725
+ else if (target instanceof basic_1.XSequenceType || target instanceof basic_1.XStringType) {
20726
+ if (((_f = source.getAbstractTypeData()) === null || _f === void 0 ? void 0 : _f.derivedFromConstant) === true) {
20727
+ return true;
20728
+ }
20722
20729
  return false;
20723
20730
  }
20724
20731
  return true;
@@ -20741,6 +20748,11 @@ class TypeUtils {
20741
20748
  return false;
20742
20749
  }
20743
20750
  }
20751
+ else if (source instanceof basic_1.XStringType) {
20752
+ if (target instanceof basic_1.CLikeType) {
20753
+ return false;
20754
+ }
20755
+ }
20744
20756
  return this.isAssignable(source, target);
20745
20757
  }
20746
20758
  isAssignable(source, target) {
@@ -20892,7 +20904,7 @@ class BasicTypes {
20892
20904
  }
20893
20905
  lookupQualifiedName(name) {
20894
20906
  var _a;
20895
- // argh, todo, rewrite this entire method, more argh
20907
+ // argh, todo, rewrite this entire method, more argh, again argh
20896
20908
  if (name === undefined) {
20897
20909
  return undefined;
20898
20910
  }
@@ -20913,7 +20925,10 @@ class BasicTypes {
20913
20925
  const stru = oo.getTypeDefinitions().getByName(subTypeName);
20914
20926
  const struType = stru === null || stru === void 0 ? void 0 : stru.getType();
20915
20927
  if (stru && struType instanceof basic_1.StructureType) {
20916
- const f = struType.getComponentByName(fieldName);
20928
+ let f = struType.getComponentByName(fieldName);
20929
+ if (split[2] && f instanceof basic_1.StructureType) {
20930
+ f = f.getComponentByName(split[2]);
20931
+ }
20917
20932
  if (f) {
20918
20933
  return new _typed_identifier_1.TypedIdentifier(stru.getToken(), stru.getFilename(), f);
20919
20934
  }
@@ -20935,7 +20950,10 @@ class BasicTypes {
20935
20950
  if (type) {
20936
20951
  const stru = type.getType();
20937
20952
  if (stru instanceof basic_1.StructureType) {
20938
- const f = stru.getComponentByName(fieldName);
20953
+ let f = stru.getComponentByName(fieldName);
20954
+ if (split[2] && f instanceof basic_1.StructureType) {
20955
+ f = f.getComponentByName(split[2]);
20956
+ }
20939
20957
  if (f) {
20940
20958
  return new _typed_identifier_1.TypedIdentifier(type.getToken(), type.getFilename(), f);
20941
20959
  }
@@ -22359,8 +22377,9 @@ const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@ab
22359
22377
  const expressions_1 = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
22360
22378
  class Constant {
22361
22379
  runSyntax(node) {
22380
+ // todo: ConcatenatedConstant is not used?
22362
22381
  if (node.findDirectExpression(expressions_1.Integer)) {
22363
- return new basic_1.IntegerType({ qualifiedName: "I" });
22382
+ return basic_1.IntegerType.get();
22364
22383
  }
22365
22384
  else if (node.getFirstToken().getStr().startsWith("'")) {
22366
22385
  let len = node.getFirstToken().getStr().length - 2;
@@ -22369,8 +22388,11 @@ class Constant {
22369
22388
  }
22370
22389
  return new basic_1.CharacterType(len, { derivedFromConstant: true });
22371
22390
  }
22391
+ else if (node.getFirstToken().getStr().startsWith("`")) {
22392
+ return basic_1.StringType.get({ derivedFromConstant: true });
22393
+ }
22372
22394
  else {
22373
- return new basic_1.StringType({ qualifiedName: "STRING" });
22395
+ return basic_1.StringType.get();
22374
22396
  }
22375
22397
  }
22376
22398
  }
@@ -23264,7 +23286,7 @@ class InlineLoopDefinition {
23264
23286
  }
23265
23287
  const index = node.findExpressionAfterToken("INTO");
23266
23288
  if (index && index.get() instanceof Expressions.TargetField) {
23267
- const identifier = new _typed_identifier_1.TypedIdentifier(index.getFirstToken(), filename, new basic_1.IntegerType(), ["inline" /* IdentifierMeta.InlineDefinition */]);
23289
+ const identifier = new _typed_identifier_1.TypedIdentifier(index.getFirstToken(), filename, basic_1.IntegerType.get(), ["inline" /* IdentifierMeta.InlineDefinition */]);
23268
23290
  scope.addReference(index.getFirstToken(), identifier, _reference_1.ReferenceType.DataWriteReference, filename);
23269
23291
  scope.addIdentifier(identifier);
23270
23292
  }
@@ -23629,7 +23651,7 @@ class MethodCallParam {
23629
23651
  else {
23630
23652
  targetType = method;
23631
23653
  }
23632
- let sourceType = new basic_1.StringType();
23654
+ let sourceType = basic_1.StringType.get();
23633
23655
  if (child.get() instanceof Expressions.Source) {
23634
23656
  sourceType = new source_1.Source().runSyntax(child, scope, filename, targetType);
23635
23657
  }
@@ -23737,6 +23759,9 @@ class MethodParam {
23737
23759
  if (concat === "TYPE C" || concat.startsWith("TYPE C ")) {
23738
23760
  return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new cgeneric_type_1.CGenericType(), meta);
23739
23761
  }
23762
+ else if (concat === "TYPE X" || concat.startsWith("TYPE X ")) {
23763
+ return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new basic_1.XGenericType(), meta);
23764
+ }
23740
23765
  const found = new basic_types_1.BasicTypes(filename, scope).parseType(type);
23741
23766
  if (found) {
23742
23767
  return new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, found, meta);
@@ -24556,7 +24581,7 @@ class Source {
24556
24581
  const method = new _builtin_1.BuiltIn().searchBuiltin(tok);
24557
24582
  scope.addReference(token, method, _reference_1.ReferenceType.BuiltinMethodReference, filename);
24558
24583
  new cond_1.Cond().runSyntax(node.findDirectExpression(Expressions.Cond), scope, filename);
24559
- return new basic_1.StringType();
24584
+ return basic_1.StringType.get();
24560
24585
  }
24561
24586
  case "XSDBOOL":
24562
24587
  {
@@ -24569,27 +24594,36 @@ class Source {
24569
24594
  {
24570
24595
  const foundType = this.determineType(node, scope, filename, targetType);
24571
24596
  const bodyType = new reduce_body_1.ReduceBody().runSyntax(node.findDirectExpression(Expressions.ReduceBody), scope, filename, foundType);
24572
- if (foundType === undefined || foundType.isGeneric() === true) {
24597
+ if (foundType === undefined || foundType.isGeneric()) {
24573
24598
  this.addIfInferred(node, scope, filename, bodyType);
24574
24599
  }
24600
+ else {
24601
+ this.addIfInferred(node, scope, filename, foundType);
24602
+ }
24575
24603
  return foundType ? foundType : bodyType;
24576
24604
  }
24577
24605
  case "SWITCH":
24578
24606
  {
24579
24607
  const foundType = this.determineType(node, scope, filename, targetType);
24580
24608
  const bodyType = new switch_body_1.SwitchBody().runSyntax(node.findDirectExpression(Expressions.SwitchBody), scope, filename);
24581
- if (foundType === undefined || foundType.isGeneric() === true) {
24609
+ if (foundType === undefined || foundType.isGeneric()) {
24582
24610
  this.addIfInferred(node, scope, filename, bodyType);
24583
24611
  }
24612
+ else {
24613
+ this.addIfInferred(node, scope, filename, foundType);
24614
+ }
24584
24615
  return foundType ? foundType : bodyType;
24585
24616
  }
24586
24617
  case "COND":
24587
24618
  {
24588
24619
  const foundType = this.determineType(node, scope, filename, targetType);
24589
24620
  const bodyType = new cond_body_1.CondBody().runSyntax(node.findDirectExpression(Expressions.CondBody), scope, filename);
24590
- if (foundType === undefined || foundType.isGeneric() === true) {
24621
+ if (foundType === undefined || foundType.isGeneric()) {
24591
24622
  this.addIfInferred(node, scope, filename, bodyType);
24592
24623
  }
24624
+ else {
24625
+ this.addIfInferred(node, scope, filename, foundType);
24626
+ }
24593
24627
  return foundType ? foundType : bodyType;
24594
24628
  }
24595
24629
  case "CONV":
@@ -24630,7 +24664,9 @@ class Source {
24630
24664
  case "CORRESPONDING":
24631
24665
  {
24632
24666
  const foundType = this.determineType(node, scope, filename, targetType);
24633
- return new corresponding_body_1.CorrespondingBody().runSyntax(node.findDirectExpression(Expressions.CorrespondingBody), scope, filename, foundType);
24667
+ new corresponding_body_1.CorrespondingBody().runSyntax(node.findDirectExpression(Expressions.CorrespondingBody), scope, filename, foundType);
24668
+ this.addIfInferred(node, scope, filename, foundType);
24669
+ return foundType;
24634
24670
  }
24635
24671
  case "EXACT":
24636
24672
  return this.determineType(node, scope, filename, targetType);
@@ -24688,7 +24724,7 @@ class Source {
24688
24724
  }
24689
24725
  }
24690
24726
  if (node.findDirectTokenByText("&&")) {
24691
- return new basic_1.StringType();
24727
+ return basic_1.StringType.get();
24692
24728
  }
24693
24729
  return context;
24694
24730
  }
@@ -24726,10 +24762,12 @@ class Source {
24726
24762
  throw new Error("determineType, child TypeNameOrInfer not found");
24727
24763
  }
24728
24764
  else if (typeName === "#" && targetType) {
24729
- const found = basic.lookupQualifiedName(targetType.getQualifiedName());
24765
+ // const found = basic.lookupQualifiedName(targetType.getQualifiedName());
24766
+ /*
24730
24767
  if (found) {
24731
- scope.addReference(typeToken, found, _reference_1.ReferenceType.InferredType, filename);
24768
+ scope.addReference(typeToken, found, ReferenceType.InferredType, filename);
24732
24769
  }
24770
+ */
24733
24771
  return targetType;
24734
24772
  }
24735
24773
  if (typeName !== "#" && typeToken) {
@@ -25012,7 +25050,7 @@ class StringTemplate {
25012
25050
  const typeUtils = new _type_utils_1.TypeUtils(scope);
25013
25051
  for (const templateSource of node.findAllExpressions(Expressions.StringTemplateSource)) {
25014
25052
  const s = templateSource.findDirectExpression(Expressions.Source);
25015
- const type = new source_1.Source().runSyntax(s, scope, filename, new basic_1.StringType({ qualifiedName: "STRING" }));
25053
+ const type = new source_1.Source().runSyntax(s, scope, filename, basic_1.StringType.get());
25016
25054
  if (type === undefined) {
25017
25055
  throw new Error("No target type determined");
25018
25056
  }
@@ -25036,7 +25074,7 @@ class StringTemplate {
25036
25074
  throw new Error("Cannot apply ALPHA to this type");
25037
25075
  }
25038
25076
  }
25039
- return new basic_1.StringType({ qualifiedName: "STRING" });
25077
+ return basic_1.StringType.get();
25040
25078
  }
25041
25079
  }
25042
25080
  exports.StringTemplate = StringTemplate;
@@ -25399,6 +25437,7 @@ class ValueBody {
25399
25437
  }
25400
25438
  for (const l of foo.findDirectExpressions(Expressions.ValueBodyLines)) {
25401
25439
  for (const s of l.findDirectExpressions(Expressions.Source)) {
25440
+ // LINES OF ?? todo, pass type,
25402
25441
  new source_1.Source().runSyntax(s, scope, filename);
25403
25442
  }
25404
25443
  }
@@ -25406,7 +25445,7 @@ class ValueBody {
25406
25445
  new field_assignment_1.FieldAssignment().runSyntax(s, scope, filename, rowType);
25407
25446
  }
25408
25447
  for (const s of foo.findDirectExpressions(Expressions.Source)) {
25409
- new source_1.Source().runSyntax(s, scope, filename);
25448
+ new source_1.Source().runSyntax(s, scope, filename, rowType);
25410
25449
  }
25411
25450
  }
25412
25451
  if (letScoped === true) {
@@ -26724,19 +26763,41 @@ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_module
26724
26763
  const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
26725
26764
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
26726
26765
  const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
26766
+ const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
26727
26767
  class Concatenate {
26728
26768
  runSyntax(node, scope, filename) {
26769
+ const byteMode = node.findDirectTokenByText("BYTE") !== undefined;
26770
+ let linesMode = node.findDirectTokenByText("LINES") !== undefined;
26729
26771
  const target = node.findFirstExpression(Expressions.Target);
26730
26772
  const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
26731
26773
  if (inline) {
26732
- // todo, does this give XSTRING in BYTE MODE?
26733
- new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.StringType());
26774
+ if (byteMode) {
26775
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.XStringType());
26776
+ }
26777
+ else {
26778
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, basic_1.StringType.get());
26779
+ }
26734
26780
  }
26735
26781
  else if (target) {
26736
- new target_1.Target().runSyntax(target, scope, filename);
26782
+ const type = new target_1.Target().runSyntax(target, scope, filename);
26783
+ const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLike(type);
26784
+ if (compatible === false) {
26785
+ throw new Error("Target type not compatible");
26786
+ }
26737
26787
  }
26738
26788
  for (const s of node.findDirectExpressions(Expressions.Source)) {
26739
- new source_1.Source().runSyntax(s, scope, filename);
26789
+ const type = new source_1.Source().runSyntax(s, scope, filename);
26790
+ if (linesMode) {
26791
+ if (!(type instanceof basic_1.UnknownType) && !(type instanceof basic_1.VoidType) && !(type instanceof basic_1.TableType)) {
26792
+ throw new Error("Source must be an internal table");
26793
+ }
26794
+ linesMode = false;
26795
+ continue;
26796
+ }
26797
+ const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLike(type);
26798
+ if (compatible === false) {
26799
+ throw new Error("Source type not compatible");
26800
+ }
26740
26801
  }
26741
26802
  }
26742
26803
  }
@@ -26829,17 +26890,17 @@ class Controls {
26829
26890
  if (node.findDirectTokenByText("TABLEVIEW") && token) {
26830
26891
  const cols = new basic_1.StructureType([
26831
26892
  { name: "SCREEN", type: new basic_1.CharacterType(1) },
26832
- { name: "INDEX", type: new basic_1.IntegerType() },
26893
+ { name: "INDEX", type: basic_1.IntegerType.get() },
26833
26894
  { name: "SELECTED", type: new basic_1.CharacterType(1) },
26834
- { name: "VISLENGTH", type: new basic_1.IntegerType() },
26895
+ { name: "VISLENGTH", type: basic_1.IntegerType.get() },
26835
26896
  { name: "INVISIBLE", type: new basic_1.CharacterType(1) },
26836
26897
  ]);
26837
26898
  const type = new basic_1.StructureType([
26838
26899
  { name: "FIXED_COLS", type: new basic_1.CharacterType(132) },
26839
- { name: "LINES", type: new basic_1.IntegerType() },
26840
- { name: "TOP_LINE", type: new basic_1.IntegerType() },
26841
- { name: "CURRENT_LINE", type: new basic_1.IntegerType() },
26842
- { name: "LEFT_COL", type: new basic_1.IntegerType() },
26900
+ { name: "LINES", type: basic_1.IntegerType.get() },
26901
+ { name: "TOP_LINE", type: basic_1.IntegerType.get() },
26902
+ { name: "CURRENT_LINE", type: basic_1.IntegerType.get() },
26903
+ { name: "LEFT_COL", type: basic_1.IntegerType.get() },
26843
26904
  { name: "LINE_SEL_MODE", type: new basic_1.CharacterType(1) },
26844
26905
  { name: "COL_SEL_MODE", type: new basic_1.CharacterType(1) },
26845
26906
  { name: "LINE_SELECTOR", type: new basic_1.CharacterType(1) },
@@ -27281,7 +27342,7 @@ class Describe {
27281
27342
  if ((linesTarget === null || linesTarget === void 0 ? void 0 : linesTarget.get()) instanceof Expressions.Target) {
27282
27343
  const inline = linesTarget === null || linesTarget === void 0 ? void 0 : linesTarget.findDirectExpression(Expressions.InlineData);
27283
27344
  if (inline) {
27284
- new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.IntegerType());
27345
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, basic_1.IntegerType.get());
27285
27346
  }
27286
27347
  else {
27287
27348
  new target_1.Target().runSyntax(linesTarget, scope, filename);
@@ -27301,7 +27362,7 @@ class Describe {
27301
27362
  if ((lengthTarget === null || lengthTarget === void 0 ? void 0 : lengthTarget.get()) instanceof Expressions.Target) {
27302
27363
  const inline = lengthTarget === null || lengthTarget === void 0 ? void 0 : lengthTarget.findDirectExpression(Expressions.InlineData);
27303
27364
  if (inline) {
27304
- new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.IntegerType());
27365
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, basic_1.IntegerType.get());
27305
27366
  }
27306
27367
  else {
27307
27368
  new target_1.Target().runSyntax(lengthTarget, scope, filename);
@@ -27311,7 +27372,7 @@ class Describe {
27311
27372
  if ((componentsTarget === null || componentsTarget === void 0 ? void 0 : componentsTarget.get()) instanceof Expressions.Target) {
27312
27373
  const inline = componentsTarget === null || componentsTarget === void 0 ? void 0 : componentsTarget.findDirectExpression(Expressions.InlineData);
27313
27374
  if (inline) {
27314
- new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.IntegerType());
27375
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, basic_1.IntegerType.get());
27315
27376
  }
27316
27377
  else {
27317
27378
  new target_1.Target().runSyntax(componentsTarget, scope, filename);
@@ -27493,13 +27554,13 @@ class Find {
27493
27554
  const rfound = node.findExpressionAfterToken("RESULTS");
27494
27555
  if (rfound && rfound.get() instanceof Expressions.Target) {
27495
27556
  const sub = new basic_1.StructureType([
27496
- { name: "OFFSET", type: new basic_1.IntegerType() },
27497
- { name: "LENGTH", type: new basic_1.IntegerType() }
27557
+ { name: "OFFSET", type: basic_1.IntegerType.get() },
27558
+ { name: "LENGTH", type: basic_1.IntegerType.get() }
27498
27559
  ], "SUBMATCH_RESULT", "SUBMATCH_RESULT");
27499
27560
  const type = new basic_1.StructureType([
27500
- { name: "LINE", type: new basic_1.IntegerType() },
27501
- { name: "OFFSET", type: new basic_1.IntegerType() },
27502
- { name: "LENGTH", type: new basic_1.IntegerType() },
27561
+ { name: "LINE", type: basic_1.IntegerType.get() },
27562
+ { name: "OFFSET", type: basic_1.IntegerType.get() },
27563
+ { name: "LENGTH", type: basic_1.IntegerType.get() },
27503
27564
  { name: "SUBMATCHES", type: new basic_1.TableType(sub, { withHeader: false, keyType: basic_1.TableKeyType.default }) },
27504
27565
  ], "MATCH_RESULT", "MATCH_RESULT");
27505
27566
  if (node.concatTokens().toUpperCase().startsWith("FIND FIRST")) {
@@ -27512,20 +27573,20 @@ class Find {
27512
27573
  const ofound = node.findExpressionsAfterToken("OFFSET");
27513
27574
  for (const o of ofound) {
27514
27575
  if (o.get() instanceof Expressions.Target) {
27515
- this.inline(o, scope, filename, new basic_1.IntegerType());
27576
+ this.inline(o, scope, filename, basic_1.IntegerType.get());
27516
27577
  }
27517
27578
  }
27518
27579
  const lfound = node.findExpressionAfterToken("LINE");
27519
27580
  if (lfound && lfound.get() instanceof Expressions.Target) {
27520
- this.inline(lfound, scope, filename, new basic_1.IntegerType());
27581
+ this.inline(lfound, scope, filename, basic_1.IntegerType.get());
27521
27582
  }
27522
27583
  const cfound = node.findExpressionAfterToken("COUNT");
27523
27584
  if (cfound && cfound.get() instanceof Expressions.Target) {
27524
- this.inline(cfound, scope, filename, new basic_1.IntegerType());
27585
+ this.inline(cfound, scope, filename, basic_1.IntegerType.get());
27525
27586
  }
27526
27587
  const lnfound = node.findExpressionAfterToken("LENGTH");
27527
27588
  if (lnfound && lnfound.get() instanceof Expressions.Target) {
27528
- this.inline(lnfound, scope, filename, new basic_1.IntegerType());
27589
+ this.inline(lnfound, scope, filename, basic_1.IntegerType.get());
27529
27590
  }
27530
27591
  if (node.findDirectTokenByText("SUBMATCHES")) {
27531
27592
  for (const t of node.findDirectExpressions(Expressions.Target)) {
@@ -27537,7 +27598,7 @@ class Find {
27537
27598
  }
27538
27599
  const inline = t === null || t === void 0 ? void 0 : t.findDirectExpression(Expressions.InlineData);
27539
27600
  if (inline) {
27540
- new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.StringType());
27601
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, basic_1.StringType.get());
27541
27602
  }
27542
27603
  else {
27543
27604
  new target_1.Target().runSyntax(t, scope, filename);
@@ -27664,15 +27725,20 @@ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_module
27664
27725
  const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
27665
27726
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
27666
27727
  const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
27728
+ const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
27667
27729
  class GetBit {
27668
27730
  runSyntax(node, scope, filename) {
27731
+ let lastType = undefined;
27669
27732
  for (const s of node.findDirectExpressions(Expressions.Source)) {
27670
- new source_1.Source().runSyntax(s, scope, filename);
27733
+ lastType = new source_1.Source().runSyntax(s, scope, filename);
27734
+ }
27735
+ if (lastType && new _type_utils_1.TypeUtils(scope).isHexLike(lastType) === false) {
27736
+ throw new Error("Input must be byte-like");
27671
27737
  }
27672
27738
  for (const t of node.findDirectExpressions(Expressions.Target)) {
27673
27739
  const inline = t === null || t === void 0 ? void 0 : t.findDirectExpression(Expressions.InlineData);
27674
27740
  if (inline) {
27675
- new inline_data_1.InlineData().runSyntax(t, scope, filename, new basic_1.IntegerType());
27741
+ new inline_data_1.InlineData().runSyntax(t, scope, filename, basic_1.IntegerType.get());
27676
27742
  }
27677
27743
  else {
27678
27744
  new target_1.Target().runSyntax(t, scope, filename);
@@ -27825,7 +27891,7 @@ class GetRunTime {
27825
27891
  const target = node.findDirectExpression(Expressions.Target);
27826
27892
  const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
27827
27893
  if (inline) {
27828
- new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.IntegerType());
27894
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, basic_1.IntegerType.get());
27829
27895
  }
27830
27896
  else if (target) {
27831
27897
  new target_1.Target().runSyntax(target, scope, filename);
@@ -28145,9 +28211,9 @@ class InsertInternal {
28145
28211
  }
28146
28212
  }
28147
28213
  for (const s of node.findDirectExpressions(Expressions.Source)) {
28148
- new source_1.Source().runSyntax(s, scope, filename, targetType);
28149
- }
28150
- for (const s of node.findDirectExpressions(Expressions.SimpleSource4)) {
28214
+ if (s === source) {
28215
+ continue;
28216
+ }
28151
28217
  new source_1.Source().runSyntax(s, scope, filename, targetType);
28152
28218
  }
28153
28219
  }
@@ -28405,7 +28471,7 @@ class Message {
28405
28471
  const found = node.findExpressionAfterToken("INTO");
28406
28472
  const inline = found === null || found === void 0 ? void 0 : found.findDirectExpression(Expressions.InlineData);
28407
28473
  if (inline) {
28408
- new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.StringType());
28474
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, basic_1.StringType.get());
28409
28475
  }
28410
28476
  else if (found) {
28411
28477
  new target_1.Target().runSyntax(found, scope, filename);
@@ -29175,14 +29241,14 @@ class ReadTable {
29175
29241
  const indexSource = node.findExpressionAfterToken("INDEX");
29176
29242
  if (indexSource) {
29177
29243
  const indexType = new source_1.Source().runSyntax(indexSource, scope, filename);
29178
- if (new _type_utils_1.TypeUtils(scope).isAssignable(indexType, new basic_1.IntegerType()) === false) {
29244
+ if (new _type_utils_1.TypeUtils(scope).isAssignable(indexType, basic_1.IntegerType.get()) === false) {
29179
29245
  throw new Error("READ TABLE, INDEX must be simple");
29180
29246
  }
29181
29247
  }
29182
29248
  const fromSource = node.findExpressionAfterToken("FROM");
29183
29249
  if (fromSource) {
29184
29250
  const fromType = new source_1.Source().runSyntax(fromSource, scope, filename);
29185
- if (new _type_utils_1.TypeUtils(scope).isAssignable(fromType, new basic_1.IntegerType()) === false) {
29251
+ if (new _type_utils_1.TypeUtils(scope).isAssignable(fromType, basic_1.IntegerType.get()) === false) {
29186
29252
  throw new Error("READ TABLE, FROM must be simple");
29187
29253
  }
29188
29254
  }
@@ -29542,13 +29608,17 @@ exports.SetBit = void 0;
29542
29608
  const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
29543
29609
  const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
29544
29610
  const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
29611
+ const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
29545
29612
  class SetBit {
29546
29613
  runSyntax(node, scope, filename) {
29547
29614
  for (const s of node.findDirectExpressions(Expressions.Source)) {
29548
29615
  new source_1.Source().runSyntax(s, scope, filename);
29549
29616
  }
29550
29617
  for (const t of node.findDirectExpressions(Expressions.Target)) {
29551
- new target_1.Target().runSyntax(t, scope, filename);
29618
+ const typ = new target_1.Target().runSyntax(t, scope, filename);
29619
+ if (typ && new _type_utils_1.TypeUtils(scope).isHexLike(typ) === false) {
29620
+ throw new Error("Input must be byte-like");
29621
+ }
29552
29622
  }
29553
29623
  }
29554
29624
  }
@@ -29803,7 +29873,7 @@ const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/
29803
29873
  class Split {
29804
29874
  runSyntax(node, scope, filename) {
29805
29875
  const intoTable = node.findTokenSequencePosition("INTO", "TABLE") !== undefined;
29806
- const type = intoTable ? new basic_1.TableType(new basic_1.StringType(), { withHeader: false, keyType: basic_1.TableKeyType.default }) : new basic_1.StringType();
29876
+ const type = intoTable ? new basic_1.TableType(basic_1.StringType.get(), { withHeader: false, keyType: basic_1.TableKeyType.default }) : basic_1.StringType.get();
29807
29877
  for (const target of node.findAllExpressions(Expressions.Target)) {
29808
29878
  const inline = target.findDirectExpression(Expressions.InlineData);
29809
29879
  if (inline) {
@@ -30836,7 +30906,7 @@ class TypeEnum {
30836
30906
  }
30837
30907
  const token = expr.getFirstToken();
30838
30908
  // integer is default if BASE TYPE is not specified
30839
- values.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.IntegerType()));
30909
+ values.push(new _typed_identifier_1.TypedIdentifier(token, filename, basic_1.IntegerType.get()));
30840
30910
  }
30841
30911
  for (const type of node.findDirectStatements(Statements.TypeEnum)) {
30842
30912
  const expr = type.findFirstExpression(Expressions.NamespaceSimpleName);
@@ -30845,7 +30915,7 @@ class TypeEnum {
30845
30915
  }
30846
30916
  const token = expr.getFirstToken();
30847
30917
  // integer is default if BASE TYPE is not specified
30848
- values.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.IntegerType()));
30918
+ values.push(new _typed_identifier_1.TypedIdentifier(token, filename, basic_1.IntegerType.get()));
30849
30919
  }
30850
30920
  const baseType = (_a = begin.findExpressionAfterToken("TYPE")) === null || _a === void 0 ? void 0 : _a.getFirstToken();
30851
30921
  const baseName = baseType === null || baseType === void 0 ? void 0 : baseType.getStr();
@@ -33701,7 +33771,7 @@ class HexType extends _abstract_type_1.AbstractType {
33701
33771
  constructor(length, qualifiedName) {
33702
33772
  super({ qualifiedName: qualifiedName });
33703
33773
  if (length <= 0) {
33704
- throw new Error("Bad LENGTHm, Hex");
33774
+ throw new Error("Bad LENGTH, Hex");
33705
33775
  }
33706
33776
  this.length = length;
33707
33777
  }
@@ -33780,6 +33850,7 @@ __exportStar(__webpack_require__(/*! ./time_type */ "./node_modules/@abaplint/co
33780
33850
  __exportStar(__webpack_require__(/*! ./unknown_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/unknown_type.js"), exports);
33781
33851
  __exportStar(__webpack_require__(/*! ./utc_long_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/utc_long_type.js"), exports);
33782
33852
  __exportStar(__webpack_require__(/*! ./void_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/void_type.js"), exports);
33853
+ __exportStar(__webpack_require__(/*! ./xgeneric_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/xgeneric_type.js"), exports);
33783
33854
  __exportStar(__webpack_require__(/*! ./xsequence_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/xsequence_type.js"), exports);
33784
33855
  __exportStar(__webpack_require__(/*! ./xstring_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/xstring_type.js"), exports);
33785
33856
  //# sourceMappingURL=index.js.map
@@ -33831,6 +33902,24 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
33831
33902
  exports.IntegerType = void 0;
33832
33903
  const _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js");
33833
33904
  class IntegerType extends _abstract_type_1.AbstractType {
33905
+ static get(input) {
33906
+ if (input === undefined) {
33907
+ return this.singleton;
33908
+ }
33909
+ return new IntegerType(input);
33910
+ }
33911
+ constructor(input) {
33912
+ super(input);
33913
+ }
33914
+ /** fully qualified symbolic name of the type */
33915
+ getQualifiedName() {
33916
+ var _a;
33917
+ const qual = (_a = this.data) === null || _a === void 0 ? void 0 : _a.qualifiedName;
33918
+ if (qual === undefined) {
33919
+ return "I";
33920
+ }
33921
+ return qual;
33922
+ }
33834
33923
  toText() {
33835
33924
  return "```i```";
33836
33925
  }
@@ -33848,6 +33937,7 @@ class IntegerType extends _abstract_type_1.AbstractType {
33848
33937
  }
33849
33938
  }
33850
33939
  exports.IntegerType = IntegerType;
33940
+ IntegerType.singleton = new IntegerType();
33851
33941
  //# sourceMappingURL=integer_type.js.map
33852
33942
 
33853
33943
  /***/ }),
@@ -34067,6 +34157,24 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
34067
34157
  exports.StringType = void 0;
34068
34158
  const _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js");
34069
34159
  class StringType extends _abstract_type_1.AbstractType {
34160
+ static get(input) {
34161
+ if (input === undefined) {
34162
+ return this.singleton;
34163
+ }
34164
+ return new StringType(input);
34165
+ }
34166
+ constructor(input) {
34167
+ super(input);
34168
+ }
34169
+ /** fully qualified symbolic name of the type */
34170
+ getQualifiedName() {
34171
+ var _a;
34172
+ const qual = (_a = this.data) === null || _a === void 0 ? void 0 : _a.qualifiedName;
34173
+ if (qual === undefined) {
34174
+ return "STRING";
34175
+ }
34176
+ return qual;
34177
+ }
34070
34178
  toText() {
34071
34179
  return "```string```";
34072
34180
  }
@@ -34084,6 +34192,7 @@ class StringType extends _abstract_type_1.AbstractType {
34084
34192
  }
34085
34193
  }
34086
34194
  exports.StringType = StringType;
34195
+ StringType.singleton = new StringType();
34087
34196
  //# sourceMappingURL=string_type.js.map
34088
34197
 
34089
34198
  /***/ }),
@@ -34382,6 +34491,39 @@ exports.VoidType = VoidType;
34382
34491
 
34383
34492
  /***/ }),
34384
34493
 
34494
+ /***/ "./node_modules/@abaplint/core/build/src/abap/types/basic/xgeneric_type.js":
34495
+ /*!*********************************************************************************!*\
34496
+ !*** ./node_modules/@abaplint/core/build/src/abap/types/basic/xgeneric_type.js ***!
34497
+ \*********************************************************************************/
34498
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
34499
+
34500
+ "use strict";
34501
+
34502
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
34503
+ exports.XGenericType = void 0;
34504
+ const _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js");
34505
+ class XGenericType extends _abstract_type_1.AbstractType {
34506
+ toText() {
34507
+ return "```x```";
34508
+ }
34509
+ isGeneric() {
34510
+ return true;
34511
+ }
34512
+ toABAP() {
34513
+ throw new Error("x, generic");
34514
+ }
34515
+ containsVoid() {
34516
+ return false;
34517
+ }
34518
+ toCDS() {
34519
+ return "abap.TODO_CGENERIC";
34520
+ }
34521
+ }
34522
+ exports.XGenericType = XGenericType;
34523
+ //# sourceMappingURL=xgeneric_type.js.map
34524
+
34525
+ /***/ }),
34526
+
34385
34527
  /***/ "./node_modules/@abaplint/core/build/src/abap/types/basic/xsequence_type.js":
34386
34528
  /*!**********************************************************************************!*\
34387
34529
  !*** ./node_modules/@abaplint/core/build/src/abap/types/basic/xsequence_type.js ***!
@@ -37244,7 +37386,7 @@ class DDIC {
37244
37386
  lookupBuiltinType(name, length, decimals, qualifiedName) {
37245
37387
  switch (name) {
37246
37388
  case "STRING":
37247
- return new Types.StringType({ qualifiedName: qualifiedName || name });
37389
+ return Types.StringType.get({ qualifiedName: qualifiedName || name });
37248
37390
  case "XSTRING":
37249
37391
  return new Types.XStringType({ qualifiedName: qualifiedName || name });
37250
37392
  case "D":
@@ -37278,7 +37420,7 @@ class DDIC {
37278
37420
  case "CSEQUENCE":
37279
37421
  return new Types.CSequenceType({ qualifiedName: qualifiedName });
37280
37422
  case "I":
37281
- return new Types.IntegerType({ qualifiedName: qualifiedName || name });
37423
+ return Types.IntegerType.get({ qualifiedName: qualifiedName || name });
37282
37424
  case "INT8": // todo, take version into account
37283
37425
  return new Types.Integer8Type({ qualifiedName: qualifiedName || name });
37284
37426
  case "F":
@@ -37568,13 +37710,14 @@ class DDIC {
37568
37710
  case "INT1":
37569
37711
  case "INT2":
37570
37712
  case "INT4":
37713
+ return Types.IntegerType.get({ qualifiedName: qualifiedName });
37571
37714
  case "INT8":
37572
- return new Types.IntegerType({ qualifiedName: qualifiedName });
37715
+ return new Types.Integer8Type({ qualifiedName: qualifiedName });
37573
37716
  case "SSTR": // 1 <= len <= 1333
37574
37717
  case "SSTRING": // 1 <= len <= 1333
37575
37718
  case "STRG": // 256 <= len
37576
37719
  case "STRING": // 256 <= len
37577
- return new Types.StringType({ qualifiedName: qualifiedName || "STRING" });
37720
+ return Types.StringType.get({ qualifiedName: qualifiedName });
37578
37721
  case "RSTR": // 256 <= len
37579
37722
  case "RAWSTRING": // 256 <= len
37580
37723
  case "GEOM_EWKB":
@@ -39038,6 +39181,9 @@ class LSPUtils {
39038
39181
  static tokenToRange(token) {
39039
39182
  return LServer.Range.create(token.getStart().getRow() - 1, token.getStart().getCol() - 1, token.getEnd().getRow() - 1, token.getEnd().getCol() - 1);
39040
39183
  }
39184
+ static positionToLS(pos) {
39185
+ return LServer.Position.create(pos.getRow() - 1, pos.getCol() - 1);
39186
+ }
39041
39187
  static identiferToLocation(identifier) {
39042
39188
  return {
39043
39189
  uri: identifier.getFilename(),
@@ -39197,7 +39343,7 @@ class CodeLens {
39197
39343
  constructor(reg) {
39198
39344
  this.reg = reg;
39199
39345
  }
39200
- list(textDocument) {
39346
+ list(textDocument, settings = { messageText: true }) {
39201
39347
  var _a;
39202
39348
  const file = _lsp_utils_1.LSPUtils.getABAPFile(this.reg, textDocument.uri);
39203
39349
  if (file === undefined) {
@@ -39209,14 +39355,22 @@ class CodeLens {
39209
39355
  }
39210
39356
  new syntax_1.SyntaxLogic(this.reg, obj).run();
39211
39357
  const ret = [];
39212
- const list = this.reg.getMSAGReferences().listByFilename(file.getFilename());
39213
- for (const l of list) {
39214
- const msag = this.reg.getObject("MSAG", l.messageClass);
39215
- if (msag === undefined) {
39216
- continue;
39358
+ if (settings.messageText === true) {
39359
+ const list = this.reg.getMSAGReferences().listByFilename(file.getFilename());
39360
+ for (const l of list) {
39361
+ const msag = this.reg.getObject("MSAG", l.messageClass);
39362
+ if (msag === undefined) {
39363
+ continue;
39364
+ }
39365
+ const text = (_a = msag.getByNumber(l.number)) === null || _a === void 0 ? void 0 : _a.getMessage();
39366
+ if (text === undefined) {
39367
+ continue;
39368
+ }
39369
+ ret.push({
39370
+ range: _lsp_utils_1.LSPUtils.tokenToRange(l.token),
39371
+ command: LServer.Command.create(text, ""),
39372
+ });
39217
39373
  }
39218
- const text = (_a = msag.getByNumber(l.number)) === null || _a === void 0 ? void 0 : _a.getMessage();
39219
- ret.push(LServer.CodeLens.create(_lsp_utils_1.LSPUtils.tokenToRange(l.token), text));
39220
39374
  }
39221
39375
  return ret;
39222
39376
  }
@@ -39898,6 +40052,81 @@ exports.Implementation = Implementation;
39898
40052
 
39899
40053
  /***/ }),
39900
40054
 
40055
+ /***/ "./node_modules/@abaplint/core/build/src/lsp/inlay_hints.js":
40056
+ /*!******************************************************************!*\
40057
+ !*** ./node_modules/@abaplint/core/build/src/lsp/inlay_hints.js ***!
40058
+ \******************************************************************/
40059
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
40060
+
40061
+ "use strict";
40062
+
40063
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
40064
+ exports.InlayHints = void 0;
40065
+ const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/esm/main.js");
40066
+ const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
40067
+ const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
40068
+ const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
40069
+ const _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
40070
+ const _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
40071
+ const types_1 = __webpack_require__(/*! ../abap/types */ "./node_modules/@abaplint/core/build/src/abap/types/index.js");
40072
+ class InlayHints {
40073
+ constructor(reg) {
40074
+ this.reg = reg;
40075
+ }
40076
+ list(textDocument, settings = { inferredTypes: true }) {
40077
+ const file = _lsp_utils_1.LSPUtils.getABAPFile(this.reg, textDocument.uri);
40078
+ if (file === undefined) {
40079
+ return [];
40080
+ }
40081
+ const obj = this.reg.findObjectForFile(file);
40082
+ if (obj === undefined || !(obj instanceof _abap_object_1.ABAPObject)) {
40083
+ return [];
40084
+ }
40085
+ const top = new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti.getTop();
40086
+ const ret = [];
40087
+ if (settings.inferredTypes === true) {
40088
+ const implicit = this.findImplicitReferences(top);
40089
+ for (const i of implicit) {
40090
+ let label = undefined;
40091
+ if (i.resolved instanceof _typed_identifier_1.TypedIdentifier) {
40092
+ label = "TYPE " + i.resolved.getType().toABAP();
40093
+ }
40094
+ else if (i.resolved instanceof types_1.ClassDefinition) {
40095
+ label = "TYPE REF TO " + i.resolved.getName();
40096
+ }
40097
+ if (label === undefined) {
40098
+ continue;
40099
+ }
40100
+ ret.push({
40101
+ label: label,
40102
+ tooltip: "Inferred type",
40103
+ kind: LServer.InlayHintKind.Type,
40104
+ paddingLeft: true,
40105
+ paddingRight: true,
40106
+ position: _lsp_utils_1.LSPUtils.positionToLS(i.position.getEnd()),
40107
+ });
40108
+ }
40109
+ }
40110
+ return ret;
40111
+ }
40112
+ findImplicitReferences(node) {
40113
+ const ret = [];
40114
+ for (const r of node.getData().references) {
40115
+ if (r.referenceType === _reference_1.ReferenceType.InferredType) {
40116
+ ret.push(r);
40117
+ }
40118
+ }
40119
+ for (const c of node.getChildren()) {
40120
+ ret.push(...this.findImplicitReferences(c));
40121
+ }
40122
+ return ret;
40123
+ }
40124
+ }
40125
+ exports.InlayHints = InlayHints;
40126
+ //# sourceMappingURL=inlay_hints.js.map
40127
+
40128
+ /***/ }),
40129
+
39901
40130
  /***/ "./node_modules/@abaplint/core/build/src/lsp/language_server.js":
39902
40131
  /*!**********************************************************************!*\
39903
40132
  !*** ./node_modules/@abaplint/core/build/src/lsp/language_server.js ***!
@@ -39924,6 +40153,7 @@ const implementation_1 = __webpack_require__(/*! ./implementation */ "./node_mod
39924
40153
  const semantic_1 = __webpack_require__(/*! ./semantic */ "./node_modules/@abaplint/core/build/src/lsp/semantic.js");
39925
40154
  const statement_flow_1 = __webpack_require__(/*! ../abap/flow/statement_flow */ "./node_modules/@abaplint/core/build/src/abap/flow/statement_flow.js");
39926
40155
  const code_lens_1 = __webpack_require__(/*! ./code_lens */ "./node_modules/@abaplint/core/build/src/lsp/code_lens.js");
40156
+ const inlay_hints_1 = __webpack_require__(/*! ./inlay_hints */ "./node_modules/@abaplint/core/build/src/lsp/inlay_hints.js");
39927
40157
  // note Ranges are zero based in LSP,
39928
40158
  // https://github.com/microsoft/language-server-protocol/blob/main/versions/protocol-2-x.md#range
39929
40159
  // but 1 based in abaplint
@@ -40005,8 +40235,12 @@ class LanguageServer {
40005
40235
  return new semantic_1.SemanticHighlighting(this.reg).semanticTokensRange(range);
40006
40236
  }
40007
40237
  // https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_codeLens
40008
- codeLens(textDocument) {
40009
- return new code_lens_1.CodeLens(this.reg).list(textDocument);
40238
+ codeLens(textDocument, settings) {
40239
+ return new code_lens_1.CodeLens(this.reg).list(textDocument, settings);
40240
+ }
40241
+ // https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_inlayHint
40242
+ inlayHints(textDocument, settings) {
40243
+ return new inlay_hints_1.InlayHints(this.reg).list(textDocument, settings);
40010
40244
  }
40011
40245
  ////////////////////////////////////////
40012
40246
  // ______ _
@@ -47215,7 +47449,7 @@ class Registry {
47215
47449
  }
47216
47450
  static abaplintVersion() {
47217
47451
  // magic, see build script "version.sh"
47218
- return "2.101.11";
47452
+ return "2.101.16";
47219
47453
  }
47220
47454
  getDDICReferences() {
47221
47455
  return this.ddicReferences;
@@ -47856,7 +48090,9 @@ const Expressions = __webpack_require__(/*! ../abap/2_statements/expressions */
47856
48090
  const _abap_rule_1 = __webpack_require__(/*! ./_abap_rule */ "./node_modules/@abaplint/core/build/src/rules/_abap_rule.js");
47857
48091
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
47858
48092
  const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
48093
+ const position_1 = __webpack_require__(/*! ../position */ "./node_modules/@abaplint/core/build/src/position.js");
47859
48094
  const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/index.js");
48095
+ const edit_helper_1 = __webpack_require__(/*! ../edit_helper */ "./node_modules/@abaplint/core/build/src/edit_helper.js");
47860
48096
  class AlignParametersConf extends _basic_rule_config_1.BasicRuleConfig {
47861
48097
  }
47862
48098
  exports.AlignParametersConf = AlignParametersConf;
@@ -47883,7 +48119,8 @@ https://github.com/SAP/styleguides/blob/master/clean-abap/CleanABAP.md#align-par
47883
48119
 
47884
48120
  Does not take effect on non functional method calls, use https://rules.abaplint.org/functional_writing/
47885
48121
 
47886
- Also https://rules.abaplint.org/max_one_method_parameter_per_line/ can help aligning parameter syntax`,
48122
+ If parameters are on the same row, no issues are reported, see
48123
+ https://rules.abaplint.org/max_one_method_parameter_per_line/ for splitting parameters to lines`,
47887
48124
  tags: [_irule_1.RuleTag.SingleFile, _irule_1.RuleTag.Whitespace, _irule_1.RuleTag.Styleguide],
47888
48125
  badExample: `CALL FUNCTION 'FOOBAR'
47889
48126
  EXPORTING
@@ -47946,16 +48183,28 @@ DATA(sdf) = VALUE type(
47946
48183
  return undefined;
47947
48184
  }
47948
48185
  let expectedEqualsColumn = 0;
48186
+ let row = 0;
47949
48187
  for (const p of candidate.parameters) {
47950
48188
  const currentCol = p.left.getLastToken().getCol() + p.left.getLastToken().getStr().length + 1;
48189
+ if (p.eq.getRow() === row) {
48190
+ return undefined;
48191
+ }
48192
+ row = p.eq.getRow();
47951
48193
  if (currentCol > expectedEqualsColumn) {
47952
48194
  expectedEqualsColumn = currentCol;
47953
48195
  }
47954
48196
  }
47955
48197
  for (const p of candidate.parameters) {
47956
48198
  if (p.eq.getCol() !== expectedEqualsColumn) {
48199
+ let fix;
48200
+ if (p.eq.getCol() < expectedEqualsColumn) {
48201
+ fix = edit_helper_1.EditHelper.insertAt(file, p.eq, " ".repeat(expectedEqualsColumn - p.eq.getCol()));
48202
+ }
48203
+ else {
48204
+ fix = edit_helper_1.EditHelper.deleteRange(file, new position_1.Position(p.eq.getRow(), expectedEqualsColumn), p.eq);
48205
+ }
47957
48206
  const message = "Align parameters to column " + expectedEqualsColumn;
47958
- return issue_1.Issue.atPosition(file, p.eq, message, this.getMetadata().key, this.getConfig().severity);
48207
+ return issue_1.Issue.atPosition(file, p.eq, message, this.getMetadata().key, this.getConfig().severity, fix);
47959
48208
  }
47960
48209
  }
47961
48210
  return undefined;
@@ -52304,6 +52553,10 @@ Make sure to test the downported code, it might not always be completely correct
52304
52553
  if (found) {
52305
52554
  return found;
52306
52555
  }
52556
+ found = this.downportReadTable(high, lowFile, highSyntax);
52557
+ if (found) {
52558
+ return found;
52559
+ }
52307
52560
  return undefined;
52308
52561
  }
52309
52562
  //////////////////////////////////////////
@@ -52459,6 +52712,10 @@ Make sure to test the downported code, it might not always be completely correct
52459
52712
  else if (fieldList.concatTokens().toUpperCase() === "COUNT( * )") {
52460
52713
  fieldDefinition = `DATA ${name} TYPE i.`;
52461
52714
  }
52715
+ else if (fieldList.concatTokens().toUpperCase() === "@ABAP_TRUE"
52716
+ || fieldList.concatTokens().toUpperCase() === "@ABAP_FALSE") {
52717
+ fieldDefinition = `DATA ${name} TYPE abap_bool.`;
52718
+ }
52462
52719
  else if (fieldList.getChildren().length === 1 && fieldList.getChildren()[0].get() instanceof Expressions.SQLAggregation) {
52463
52720
  const c = fieldList.getChildren()[0];
52464
52721
  if (c instanceof nodes_1.ExpressionNode) {
@@ -52599,6 +52856,22 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
52599
52856
  }
52600
52857
  return undefined;
52601
52858
  }
52859
+ downportReadTable(high, lowFile, highSyntax) {
52860
+ if (!(high.get() instanceof Statements.ReadTable)) {
52861
+ return undefined;
52862
+ }
52863
+ const source = high.findExpressionAfterToken("TABLE");
52864
+ if ((source === null || source === void 0 ? void 0 : source.get()) instanceof Expressions.Source) {
52865
+ const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
52866
+ const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
52867
+ const firstToken = high.getFirstToken();
52868
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA(${uniqueName}) = ${source.concatTokens()}.\n` + indentation);
52869
+ const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
52870
+ const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
52871
+ return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Outline table source", this.getMetadata().key, this.conf.severity, fix);
52872
+ }
52873
+ return undefined;
52874
+ }
52602
52875
  replaceInsertExpression(high, lowFile, highSyntax) {
52603
52876
  if (!(high.get() instanceof Statements.InsertInternal)) {
52604
52877
  return undefined;
@@ -55724,11 +55997,11 @@ DATA lt_bar TYPE STANDARD TABLE OF ty.`,
55724
55997
  const concat = tt.concatTokens().toUpperCase();
55725
55998
  if (concat.includes("TYPE TABLE OF")) {
55726
55999
  const message = "Specify table type";
55727
- issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
56000
+ issues.push(issue_1.Issue.atPosition(file, tt.getFirstToken().getStart(), message, this.getMetadata().key, this.conf.severity));
55728
56001
  }
55729
56002
  else if (concat.includes(" WITH ") === false && concat.includes(" RANGE OF ") === false) {
55730
56003
  const message = "Specify table key";
55731
- issues.push(issue_1.Issue.atStatement(file, statement, message, this.getMetadata().key, this.conf.severity));
56004
+ issues.push(issue_1.Issue.atPosition(file, tt.getFirstToken().getStart(), message, this.getMetadata().key, this.conf.severity));
55732
56005
  }
55733
56006
  }
55734
56007
  return issues;
@@ -63508,7 +63781,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
63508
63781
  exports.SelectSingleFullKey = exports.SelectSingleFullKeyConf = void 0;
63509
63782
  const issue_1 = __webpack_require__(/*! ../issue */ "./node_modules/@abaplint/core/build/src/issue.js");
63510
63783
  const _basic_rule_config_1 = __webpack_require__(/*! ./_basic_rule_config */ "./node_modules/@abaplint/core/build/src/rules/_basic_rule_config.js");
63511
- const _irule_1 = __webpack_require__(/*! ./_irule */ "./node_modules/@abaplint/core/build/src/rules/_irule.js");
63512
63784
  const __1 = __webpack_require__(/*! .. */ "./node_modules/@abaplint/core/build/src/index.js");
63513
63785
  class SelectSingleFullKeyConf extends _basic_rule_config_1.BasicRuleConfig {
63514
63786
  constructor() {
@@ -63528,7 +63800,7 @@ class SelectSingleFullKey {
63528
63800
  shortDescription: `Detect SELECT SINGLE which are possibily not unique`,
63529
63801
  extendedInformation: `Table definitions must be known, ie. inside the errorNamespace`,
63530
63802
  pseudoComment: "EC CI_NOORDER",
63531
- tags: [_irule_1.RuleTag.Experimental],
63803
+ tags: [],
63532
63804
  };
63533
63805
  }
63534
63806
  initialize(reg) {
@@ -81699,7 +81971,7 @@ function readDocType(xmlData, i){
81699
81971
  i += 7;
81700
81972
  [entityName, val,i] = readEntityExp(xmlData,i+1);
81701
81973
  if(val.indexOf("&") === -1) //Parameter entities are not supported
81702
- entities[ entityName ] = {
81974
+ entities[ validateEntityName(entityName) ] = {
81703
81975
  regx : RegExp( `&${entityName};`,"g"),
81704
81976
  val: val
81705
81977
  };
@@ -81820,6 +82092,18 @@ function isNotation(xmlData, i){
81820
82092
  return false
81821
82093
  }
81822
82094
 
82095
+ //an entity name should not contains special characters that may be used in regex
82096
+ //Eg !?\\\/[]$%{}^&*()<>
82097
+ const specialChar = "!?\\\/[]$%{}^&*()<>|+";
82098
+
82099
+ function validateEntityName(name){
82100
+ for (let i = 0; i < specialChar.length; i++) {
82101
+ const ch = specialChar[i];
82102
+ if(name.indexOf(ch) !== -1) throw new Error(`Invalid character ${ch} in entity name`);
82103
+ }
82104
+ return name;
82105
+ }
82106
+
81823
82107
  module.exports = readDocType;
81824
82108
 
81825
82109
  /***/ }),