@abaplint/transpiler-cli 2.7.22 → 2.7.23

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 +471 -245
  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
@@ -20678,7 +20678,7 @@ class TypeUtils {
20678
20678
  return false;
20679
20679
  }
20680
20680
  isAssignableStrict(source, target) {
20681
- var _a, _b, _c, _d, _e;
20681
+ var _a, _b, _c, _d, _e, _f;
20682
20682
  /*
20683
20683
  console.dir(source);
20684
20684
  console.dir(target);
@@ -20717,8 +20717,14 @@ class TypeUtils {
20717
20717
  return false;
20718
20718
  }
20719
20719
  }
20720
- else if (source instanceof basic_1.StringType && target instanceof basic_1.StructureType) {
20721
- if (this.structureContainsString(target)) {
20720
+ else if (source instanceof basic_1.StringType) {
20721
+ if (target instanceof basic_1.StructureType && this.structureContainsString(target)) {
20722
+ return false;
20723
+ }
20724
+ else if (target instanceof basic_1.XSequenceType || target instanceof basic_1.XStringType) {
20725
+ if (((_f = source.getAbstractTypeData()) === null || _f === void 0 ? void 0 : _f.derivedFromConstant) === true) {
20726
+ return true;
20727
+ }
20722
20728
  return false;
20723
20729
  }
20724
20730
  return true;
@@ -20741,6 +20747,11 @@ class TypeUtils {
20741
20747
  return false;
20742
20748
  }
20743
20749
  }
20750
+ else if (source instanceof basic_1.XStringType) {
20751
+ if (target instanceof basic_1.CLikeType) {
20752
+ return false;
20753
+ }
20754
+ }
20744
20755
  return this.isAssignable(source, target);
20745
20756
  }
20746
20757
  isAssignable(source, target) {
@@ -22359,8 +22370,9 @@ const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@ab
22359
22370
  const expressions_1 = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
22360
22371
  class Constant {
22361
22372
  runSyntax(node) {
22373
+ // todo: ConcatenatedConstant is not used?
22362
22374
  if (node.findDirectExpression(expressions_1.Integer)) {
22363
- return new basic_1.IntegerType({ qualifiedName: "I" });
22375
+ return basic_1.IntegerType.get();
22364
22376
  }
22365
22377
  else if (node.getFirstToken().getStr().startsWith("'")) {
22366
22378
  let len = node.getFirstToken().getStr().length - 2;
@@ -22369,8 +22381,11 @@ class Constant {
22369
22381
  }
22370
22382
  return new basic_1.CharacterType(len, { derivedFromConstant: true });
22371
22383
  }
22384
+ else if (node.getFirstToken().getStr().startsWith("`")) {
22385
+ return basic_1.StringType.get({ derivedFromConstant: true });
22386
+ }
22372
22387
  else {
22373
- return new basic_1.StringType({ qualifiedName: "STRING" });
22388
+ return basic_1.StringType.get();
22374
22389
  }
22375
22390
  }
22376
22391
  }
@@ -23264,7 +23279,7 @@ class InlineLoopDefinition {
23264
23279
  }
23265
23280
  const index = node.findExpressionAfterToken("INTO");
23266
23281
  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 */]);
23282
+ const identifier = new _typed_identifier_1.TypedIdentifier(index.getFirstToken(), filename, basic_1.IntegerType.get(), ["inline" /* IdentifierMeta.InlineDefinition */]);
23268
23283
  scope.addReference(index.getFirstToken(), identifier, _reference_1.ReferenceType.DataWriteReference, filename);
23269
23284
  scope.addIdentifier(identifier);
23270
23285
  }
@@ -23629,7 +23644,7 @@ class MethodCallParam {
23629
23644
  else {
23630
23645
  targetType = method;
23631
23646
  }
23632
- let sourceType = new basic_1.StringType();
23647
+ let sourceType = basic_1.StringType.get();
23633
23648
  if (child.get() instanceof Expressions.Source) {
23634
23649
  sourceType = new source_1.Source().runSyntax(child, scope, filename, targetType);
23635
23650
  }
@@ -24556,7 +24571,7 @@ class Source {
24556
24571
  const method = new _builtin_1.BuiltIn().searchBuiltin(tok);
24557
24572
  scope.addReference(token, method, _reference_1.ReferenceType.BuiltinMethodReference, filename);
24558
24573
  new cond_1.Cond().runSyntax(node.findDirectExpression(Expressions.Cond), scope, filename);
24559
- return new basic_1.StringType();
24574
+ return basic_1.StringType.get();
24560
24575
  }
24561
24576
  case "XSDBOOL":
24562
24577
  {
@@ -24569,27 +24584,36 @@ class Source {
24569
24584
  {
24570
24585
  const foundType = this.determineType(node, scope, filename, targetType);
24571
24586
  const bodyType = new reduce_body_1.ReduceBody().runSyntax(node.findDirectExpression(Expressions.ReduceBody), scope, filename, foundType);
24572
- if (foundType === undefined || foundType.isGeneric() === true) {
24587
+ if (foundType === undefined || foundType.isGeneric()) {
24573
24588
  this.addIfInferred(node, scope, filename, bodyType);
24574
24589
  }
24590
+ else {
24591
+ this.addIfInferred(node, scope, filename, foundType);
24592
+ }
24575
24593
  return foundType ? foundType : bodyType;
24576
24594
  }
24577
24595
  case "SWITCH":
24578
24596
  {
24579
24597
  const foundType = this.determineType(node, scope, filename, targetType);
24580
24598
  const bodyType = new switch_body_1.SwitchBody().runSyntax(node.findDirectExpression(Expressions.SwitchBody), scope, filename);
24581
- if (foundType === undefined || foundType.isGeneric() === true) {
24599
+ if (foundType === undefined || foundType.isGeneric()) {
24582
24600
  this.addIfInferred(node, scope, filename, bodyType);
24583
24601
  }
24602
+ else {
24603
+ this.addIfInferred(node, scope, filename, foundType);
24604
+ }
24584
24605
  return foundType ? foundType : bodyType;
24585
24606
  }
24586
24607
  case "COND":
24587
24608
  {
24588
24609
  const foundType = this.determineType(node, scope, filename, targetType);
24589
24610
  const bodyType = new cond_body_1.CondBody().runSyntax(node.findDirectExpression(Expressions.CondBody), scope, filename);
24590
- if (foundType === undefined || foundType.isGeneric() === true) {
24611
+ if (foundType === undefined || foundType.isGeneric()) {
24591
24612
  this.addIfInferred(node, scope, filename, bodyType);
24592
24613
  }
24614
+ else {
24615
+ this.addIfInferred(node, scope, filename, foundType);
24616
+ }
24593
24617
  return foundType ? foundType : bodyType;
24594
24618
  }
24595
24619
  case "CONV":
@@ -24630,7 +24654,9 @@ class Source {
24630
24654
  case "CORRESPONDING":
24631
24655
  {
24632
24656
  const foundType = this.determineType(node, scope, filename, targetType);
24633
- return new corresponding_body_1.CorrespondingBody().runSyntax(node.findDirectExpression(Expressions.CorrespondingBody), scope, filename, foundType);
24657
+ new corresponding_body_1.CorrespondingBody().runSyntax(node.findDirectExpression(Expressions.CorrespondingBody), scope, filename, foundType);
24658
+ this.addIfInferred(node, scope, filename, foundType);
24659
+ return foundType;
24634
24660
  }
24635
24661
  case "EXACT":
24636
24662
  return this.determineType(node, scope, filename, targetType);
@@ -24688,7 +24714,7 @@ class Source {
24688
24714
  }
24689
24715
  }
24690
24716
  if (node.findDirectTokenByText("&&")) {
24691
- return new basic_1.StringType();
24717
+ return basic_1.StringType.get();
24692
24718
  }
24693
24719
  return context;
24694
24720
  }
@@ -24726,10 +24752,12 @@ class Source {
24726
24752
  throw new Error("determineType, child TypeNameOrInfer not found");
24727
24753
  }
24728
24754
  else if (typeName === "#" && targetType) {
24729
- const found = basic.lookupQualifiedName(targetType.getQualifiedName());
24755
+ // const found = basic.lookupQualifiedName(targetType.getQualifiedName());
24756
+ /*
24730
24757
  if (found) {
24731
- scope.addReference(typeToken, found, _reference_1.ReferenceType.InferredType, filename);
24758
+ scope.addReference(typeToken, found, ReferenceType.InferredType, filename);
24732
24759
  }
24760
+ */
24733
24761
  return targetType;
24734
24762
  }
24735
24763
  if (typeName !== "#" && typeToken) {
@@ -25012,7 +25040,7 @@ class StringTemplate {
25012
25040
  const typeUtils = new _type_utils_1.TypeUtils(scope);
25013
25041
  for (const templateSource of node.findAllExpressions(Expressions.StringTemplateSource)) {
25014
25042
  const s = templateSource.findDirectExpression(Expressions.Source);
25015
- const type = new source_1.Source().runSyntax(s, scope, filename, new basic_1.StringType({ qualifiedName: "STRING" }));
25043
+ const type = new source_1.Source().runSyntax(s, scope, filename, basic_1.StringType.get());
25016
25044
  if (type === undefined) {
25017
25045
  throw new Error("No target type determined");
25018
25046
  }
@@ -25036,7 +25064,7 @@ class StringTemplate {
25036
25064
  throw new Error("Cannot apply ALPHA to this type");
25037
25065
  }
25038
25066
  }
25039
- return new basic_1.StringType({ qualifiedName: "STRING" });
25067
+ return basic_1.StringType.get();
25040
25068
  }
25041
25069
  }
25042
25070
  exports.StringTemplate = StringTemplate;
@@ -25399,6 +25427,7 @@ class ValueBody {
25399
25427
  }
25400
25428
  for (const l of foo.findDirectExpressions(Expressions.ValueBodyLines)) {
25401
25429
  for (const s of l.findDirectExpressions(Expressions.Source)) {
25430
+ // LINES OF ?? todo, pass type,
25402
25431
  new source_1.Source().runSyntax(s, scope, filename);
25403
25432
  }
25404
25433
  }
@@ -25406,7 +25435,7 @@ class ValueBody {
25406
25435
  new field_assignment_1.FieldAssignment().runSyntax(s, scope, filename, rowType);
25407
25436
  }
25408
25437
  for (const s of foo.findDirectExpressions(Expressions.Source)) {
25409
- new source_1.Source().runSyntax(s, scope, filename);
25438
+ new source_1.Source().runSyntax(s, scope, filename, rowType);
25410
25439
  }
25411
25440
  }
25412
25441
  if (letScoped === true) {
@@ -26724,19 +26753,41 @@ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_module
26724
26753
  const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
26725
26754
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
26726
26755
  const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
26756
+ const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
26727
26757
  class Concatenate {
26728
26758
  runSyntax(node, scope, filename) {
26759
+ const byteMode = node.findDirectTokenByText("BYTE") !== undefined;
26760
+ let linesMode = node.findDirectTokenByText("LINES") !== undefined;
26729
26761
  const target = node.findFirstExpression(Expressions.Target);
26730
26762
  const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
26731
26763
  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());
26764
+ if (byteMode) {
26765
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.XStringType());
26766
+ }
26767
+ else {
26768
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, basic_1.StringType.get());
26769
+ }
26734
26770
  }
26735
26771
  else if (target) {
26736
- new target_1.Target().runSyntax(target, scope, filename);
26772
+ const type = new target_1.Target().runSyntax(target, scope, filename);
26773
+ const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLike(type);
26774
+ if (compatible === false) {
26775
+ throw new Error("Target type not compatible");
26776
+ }
26737
26777
  }
26738
26778
  for (const s of node.findDirectExpressions(Expressions.Source)) {
26739
- new source_1.Source().runSyntax(s, scope, filename);
26779
+ const type = new source_1.Source().runSyntax(s, scope, filename);
26780
+ if (linesMode) {
26781
+ if (!(type instanceof basic_1.UnknownType) && !(type instanceof basic_1.VoidType) && !(type instanceof basic_1.TableType)) {
26782
+ throw new Error("Source must be an internal table");
26783
+ }
26784
+ linesMode = false;
26785
+ continue;
26786
+ }
26787
+ const compatible = byteMode ? new _type_utils_1.TypeUtils(scope).isHexLike(type) : new _type_utils_1.TypeUtils(scope).isCharLike(type);
26788
+ if (compatible === false) {
26789
+ throw new Error("Source type not compatible");
26790
+ }
26740
26791
  }
26741
26792
  }
26742
26793
  }
@@ -26829,17 +26880,17 @@ class Controls {
26829
26880
  if (node.findDirectTokenByText("TABLEVIEW") && token) {
26830
26881
  const cols = new basic_1.StructureType([
26831
26882
  { name: "SCREEN", type: new basic_1.CharacterType(1) },
26832
- { name: "INDEX", type: new basic_1.IntegerType() },
26883
+ { name: "INDEX", type: basic_1.IntegerType.get() },
26833
26884
  { name: "SELECTED", type: new basic_1.CharacterType(1) },
26834
- { name: "VISLENGTH", type: new basic_1.IntegerType() },
26885
+ { name: "VISLENGTH", type: basic_1.IntegerType.get() },
26835
26886
  { name: "INVISIBLE", type: new basic_1.CharacterType(1) },
26836
26887
  ]);
26837
26888
  const type = new basic_1.StructureType([
26838
26889
  { 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() },
26890
+ { name: "LINES", type: basic_1.IntegerType.get() },
26891
+ { name: "TOP_LINE", type: basic_1.IntegerType.get() },
26892
+ { name: "CURRENT_LINE", type: basic_1.IntegerType.get() },
26893
+ { name: "LEFT_COL", type: basic_1.IntegerType.get() },
26843
26894
  { name: "LINE_SEL_MODE", type: new basic_1.CharacterType(1) },
26844
26895
  { name: "COL_SEL_MODE", type: new basic_1.CharacterType(1) },
26845
26896
  { name: "LINE_SELECTOR", type: new basic_1.CharacterType(1) },
@@ -27281,7 +27332,7 @@ class Describe {
27281
27332
  if ((linesTarget === null || linesTarget === void 0 ? void 0 : linesTarget.get()) instanceof Expressions.Target) {
27282
27333
  const inline = linesTarget === null || linesTarget === void 0 ? void 0 : linesTarget.findDirectExpression(Expressions.InlineData);
27283
27334
  if (inline) {
27284
- new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.IntegerType());
27335
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, basic_1.IntegerType.get());
27285
27336
  }
27286
27337
  else {
27287
27338
  new target_1.Target().runSyntax(linesTarget, scope, filename);
@@ -27301,7 +27352,7 @@ class Describe {
27301
27352
  if ((lengthTarget === null || lengthTarget === void 0 ? void 0 : lengthTarget.get()) instanceof Expressions.Target) {
27302
27353
  const inline = lengthTarget === null || lengthTarget === void 0 ? void 0 : lengthTarget.findDirectExpression(Expressions.InlineData);
27303
27354
  if (inline) {
27304
- new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.IntegerType());
27355
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, basic_1.IntegerType.get());
27305
27356
  }
27306
27357
  else {
27307
27358
  new target_1.Target().runSyntax(lengthTarget, scope, filename);
@@ -27311,7 +27362,7 @@ class Describe {
27311
27362
  if ((componentsTarget === null || componentsTarget === void 0 ? void 0 : componentsTarget.get()) instanceof Expressions.Target) {
27312
27363
  const inline = componentsTarget === null || componentsTarget === void 0 ? void 0 : componentsTarget.findDirectExpression(Expressions.InlineData);
27313
27364
  if (inline) {
27314
- 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());
27315
27366
  }
27316
27367
  else {
27317
27368
  new target_1.Target().runSyntax(componentsTarget, scope, filename);
@@ -27493,13 +27544,13 @@ class Find {
27493
27544
  const rfound = node.findExpressionAfterToken("RESULTS");
27494
27545
  if (rfound && rfound.get() instanceof Expressions.Target) {
27495
27546
  const sub = new basic_1.StructureType([
27496
- { name: "OFFSET", type: new basic_1.IntegerType() },
27497
- { name: "LENGTH", type: new basic_1.IntegerType() }
27547
+ { name: "OFFSET", type: basic_1.IntegerType.get() },
27548
+ { name: "LENGTH", type: basic_1.IntegerType.get() }
27498
27549
  ], "SUBMATCH_RESULT", "SUBMATCH_RESULT");
27499
27550
  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() },
27551
+ { name: "LINE", type: basic_1.IntegerType.get() },
27552
+ { name: "OFFSET", type: basic_1.IntegerType.get() },
27553
+ { name: "LENGTH", type: basic_1.IntegerType.get() },
27503
27554
  { name: "SUBMATCHES", type: new basic_1.TableType(sub, { withHeader: false, keyType: basic_1.TableKeyType.default }) },
27504
27555
  ], "MATCH_RESULT", "MATCH_RESULT");
27505
27556
  if (node.concatTokens().toUpperCase().startsWith("FIND FIRST")) {
@@ -27512,20 +27563,20 @@ class Find {
27512
27563
  const ofound = node.findExpressionsAfterToken("OFFSET");
27513
27564
  for (const o of ofound) {
27514
27565
  if (o.get() instanceof Expressions.Target) {
27515
- this.inline(o, scope, filename, new basic_1.IntegerType());
27566
+ this.inline(o, scope, filename, basic_1.IntegerType.get());
27516
27567
  }
27517
27568
  }
27518
27569
  const lfound = node.findExpressionAfterToken("LINE");
27519
27570
  if (lfound && lfound.get() instanceof Expressions.Target) {
27520
- this.inline(lfound, scope, filename, new basic_1.IntegerType());
27571
+ this.inline(lfound, scope, filename, basic_1.IntegerType.get());
27521
27572
  }
27522
27573
  const cfound = node.findExpressionAfterToken("COUNT");
27523
27574
  if (cfound && cfound.get() instanceof Expressions.Target) {
27524
- this.inline(cfound, scope, filename, new basic_1.IntegerType());
27575
+ this.inline(cfound, scope, filename, basic_1.IntegerType.get());
27525
27576
  }
27526
27577
  const lnfound = node.findExpressionAfterToken("LENGTH");
27527
27578
  if (lnfound && lnfound.get() instanceof Expressions.Target) {
27528
- this.inline(lnfound, scope, filename, new basic_1.IntegerType());
27579
+ this.inline(lnfound, scope, filename, basic_1.IntegerType.get());
27529
27580
  }
27530
27581
  if (node.findDirectTokenByText("SUBMATCHES")) {
27531
27582
  for (const t of node.findDirectExpressions(Expressions.Target)) {
@@ -27537,7 +27588,7 @@ class Find {
27537
27588
  }
27538
27589
  const inline = t === null || t === void 0 ? void 0 : t.findDirectExpression(Expressions.InlineData);
27539
27590
  if (inline) {
27540
- new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.StringType());
27591
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, basic_1.StringType.get());
27541
27592
  }
27542
27593
  else {
27543
27594
  new target_1.Target().runSyntax(t, scope, filename);
@@ -27664,15 +27715,20 @@ const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_module
27664
27715
  const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
27665
27716
  const basic_1 = __webpack_require__(/*! ../../types/basic */ "./node_modules/@abaplint/core/build/src/abap/types/basic/index.js");
27666
27717
  const inline_data_1 = __webpack_require__(/*! ../expressions/inline_data */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/inline_data.js");
27718
+ const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
27667
27719
  class GetBit {
27668
27720
  runSyntax(node, scope, filename) {
27721
+ let lastType = undefined;
27669
27722
  for (const s of node.findDirectExpressions(Expressions.Source)) {
27670
- new source_1.Source().runSyntax(s, scope, filename);
27723
+ lastType = new source_1.Source().runSyntax(s, scope, filename);
27724
+ }
27725
+ if (lastType && new _type_utils_1.TypeUtils(scope).isHexLike(lastType) === false) {
27726
+ throw new Error("Input must be byte-like");
27671
27727
  }
27672
27728
  for (const t of node.findDirectExpressions(Expressions.Target)) {
27673
27729
  const inline = t === null || t === void 0 ? void 0 : t.findDirectExpression(Expressions.InlineData);
27674
27730
  if (inline) {
27675
- new inline_data_1.InlineData().runSyntax(t, scope, filename, new basic_1.IntegerType());
27731
+ new inline_data_1.InlineData().runSyntax(t, scope, filename, basic_1.IntegerType.get());
27676
27732
  }
27677
27733
  else {
27678
27734
  new target_1.Target().runSyntax(t, scope, filename);
@@ -27825,7 +27881,7 @@ class GetRunTime {
27825
27881
  const target = node.findDirectExpression(Expressions.Target);
27826
27882
  const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
27827
27883
  if (inline) {
27828
- new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.IntegerType());
27884
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, basic_1.IntegerType.get());
27829
27885
  }
27830
27886
  else if (target) {
27831
27887
  new target_1.Target().runSyntax(target, scope, filename);
@@ -28145,9 +28201,9 @@ class InsertInternal {
28145
28201
  }
28146
28202
  }
28147
28203
  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)) {
28204
+ if (s === source) {
28205
+ continue;
28206
+ }
28151
28207
  new source_1.Source().runSyntax(s, scope, filename, targetType);
28152
28208
  }
28153
28209
  }
@@ -28405,7 +28461,7 @@ class Message {
28405
28461
  const found = node.findExpressionAfterToken("INTO");
28406
28462
  const inline = found === null || found === void 0 ? void 0 : found.findDirectExpression(Expressions.InlineData);
28407
28463
  if (inline) {
28408
- new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.StringType());
28464
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, basic_1.StringType.get());
28409
28465
  }
28410
28466
  else if (found) {
28411
28467
  new target_1.Target().runSyntax(found, scope, filename);
@@ -29175,14 +29231,14 @@ class ReadTable {
29175
29231
  const indexSource = node.findExpressionAfterToken("INDEX");
29176
29232
  if (indexSource) {
29177
29233
  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) {
29234
+ if (new _type_utils_1.TypeUtils(scope).isAssignable(indexType, basic_1.IntegerType.get()) === false) {
29179
29235
  throw new Error("READ TABLE, INDEX must be simple");
29180
29236
  }
29181
29237
  }
29182
29238
  const fromSource = node.findExpressionAfterToken("FROM");
29183
29239
  if (fromSource) {
29184
29240
  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) {
29241
+ if (new _type_utils_1.TypeUtils(scope).isAssignable(fromType, basic_1.IntegerType.get()) === false) {
29186
29242
  throw new Error("READ TABLE, FROM must be simple");
29187
29243
  }
29188
29244
  }
@@ -29542,13 +29598,17 @@ exports.SetBit = void 0;
29542
29598
  const Expressions = __webpack_require__(/*! ../../2_statements/expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
29543
29599
  const source_1 = __webpack_require__(/*! ../expressions/source */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/source.js");
29544
29600
  const target_1 = __webpack_require__(/*! ../expressions/target */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/expressions/target.js");
29601
+ const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_type_utils.js");
29545
29602
  class SetBit {
29546
29603
  runSyntax(node, scope, filename) {
29547
29604
  for (const s of node.findDirectExpressions(Expressions.Source)) {
29548
29605
  new source_1.Source().runSyntax(s, scope, filename);
29549
29606
  }
29550
29607
  for (const t of node.findDirectExpressions(Expressions.Target)) {
29551
- new target_1.Target().runSyntax(t, scope, filename);
29608
+ const typ = new target_1.Target().runSyntax(t, scope, filename);
29609
+ if (typ && new _type_utils_1.TypeUtils(scope).isHexLike(typ) === false) {
29610
+ throw new Error("Input must be byte-like");
29611
+ }
29552
29612
  }
29553
29613
  }
29554
29614
  }
@@ -29803,7 +29863,7 @@ const _type_utils_1 = __webpack_require__(/*! ../_type_utils */ "./node_modules/
29803
29863
  class Split {
29804
29864
  runSyntax(node, scope, filename) {
29805
29865
  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();
29866
+ const type = intoTable ? new basic_1.TableType(basic_1.StringType.get(), { withHeader: false, keyType: basic_1.TableKeyType.default }) : basic_1.StringType.get();
29807
29867
  for (const target of node.findAllExpressions(Expressions.Target)) {
29808
29868
  const inline = target.findDirectExpression(Expressions.InlineData);
29809
29869
  if (inline) {
@@ -30836,7 +30896,7 @@ class TypeEnum {
30836
30896
  }
30837
30897
  const token = expr.getFirstToken();
30838
30898
  // integer is default if BASE TYPE is not specified
30839
- values.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.IntegerType()));
30899
+ values.push(new _typed_identifier_1.TypedIdentifier(token, filename, basic_1.IntegerType.get()));
30840
30900
  }
30841
30901
  for (const type of node.findDirectStatements(Statements.TypeEnum)) {
30842
30902
  const expr = type.findFirstExpression(Expressions.NamespaceSimpleName);
@@ -30845,7 +30905,7 @@ class TypeEnum {
30845
30905
  }
30846
30906
  const token = expr.getFirstToken();
30847
30907
  // integer is default if BASE TYPE is not specified
30848
- values.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.IntegerType()));
30908
+ values.push(new _typed_identifier_1.TypedIdentifier(token, filename, basic_1.IntegerType.get()));
30849
30909
  }
30850
30910
  const baseType = (_a = begin.findExpressionAfterToken("TYPE")) === null || _a === void 0 ? void 0 : _a.getFirstToken();
30851
30911
  const baseName = baseType === null || baseType === void 0 ? void 0 : baseType.getStr();
@@ -33831,6 +33891,24 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
33831
33891
  exports.IntegerType = void 0;
33832
33892
  const _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js");
33833
33893
  class IntegerType extends _abstract_type_1.AbstractType {
33894
+ static get(input) {
33895
+ if (input === undefined) {
33896
+ return this.singleton;
33897
+ }
33898
+ return new IntegerType(input);
33899
+ }
33900
+ constructor(input) {
33901
+ super(input);
33902
+ }
33903
+ /** fully qualified symbolic name of the type */
33904
+ getQualifiedName() {
33905
+ var _a;
33906
+ const qual = (_a = this.data) === null || _a === void 0 ? void 0 : _a.qualifiedName;
33907
+ if (qual === undefined) {
33908
+ return "I";
33909
+ }
33910
+ return qual;
33911
+ }
33834
33912
  toText() {
33835
33913
  return "```i```";
33836
33914
  }
@@ -33848,6 +33926,7 @@ class IntegerType extends _abstract_type_1.AbstractType {
33848
33926
  }
33849
33927
  }
33850
33928
  exports.IntegerType = IntegerType;
33929
+ IntegerType.singleton = new IntegerType();
33851
33930
  //# sourceMappingURL=integer_type.js.map
33852
33931
 
33853
33932
  /***/ }),
@@ -34067,6 +34146,24 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
34067
34146
  exports.StringType = void 0;
34068
34147
  const _abstract_type_1 = __webpack_require__(/*! ./_abstract_type */ "./node_modules/@abaplint/core/build/src/abap/types/basic/_abstract_type.js");
34069
34148
  class StringType extends _abstract_type_1.AbstractType {
34149
+ static get(input) {
34150
+ if (input === undefined) {
34151
+ return this.singleton;
34152
+ }
34153
+ return new StringType(input);
34154
+ }
34155
+ constructor(input) {
34156
+ super(input);
34157
+ }
34158
+ /** fully qualified symbolic name of the type */
34159
+ getQualifiedName() {
34160
+ var _a;
34161
+ const qual = (_a = this.data) === null || _a === void 0 ? void 0 : _a.qualifiedName;
34162
+ if (qual === undefined) {
34163
+ return "STRING";
34164
+ }
34165
+ return qual;
34166
+ }
34070
34167
  toText() {
34071
34168
  return "```string```";
34072
34169
  }
@@ -34084,6 +34181,7 @@ class StringType extends _abstract_type_1.AbstractType {
34084
34181
  }
34085
34182
  }
34086
34183
  exports.StringType = StringType;
34184
+ StringType.singleton = new StringType();
34087
34185
  //# sourceMappingURL=string_type.js.map
34088
34186
 
34089
34187
  /***/ }),
@@ -37244,7 +37342,7 @@ class DDIC {
37244
37342
  lookupBuiltinType(name, length, decimals, qualifiedName) {
37245
37343
  switch (name) {
37246
37344
  case "STRING":
37247
- return new Types.StringType({ qualifiedName: qualifiedName || name });
37345
+ return Types.StringType.get({ qualifiedName: qualifiedName || name });
37248
37346
  case "XSTRING":
37249
37347
  return new Types.XStringType({ qualifiedName: qualifiedName || name });
37250
37348
  case "D":
@@ -37278,7 +37376,7 @@ class DDIC {
37278
37376
  case "CSEQUENCE":
37279
37377
  return new Types.CSequenceType({ qualifiedName: qualifiedName });
37280
37378
  case "I":
37281
- return new Types.IntegerType({ qualifiedName: qualifiedName || name });
37379
+ return Types.IntegerType.get({ qualifiedName: qualifiedName || name });
37282
37380
  case "INT8": // todo, take version into account
37283
37381
  return new Types.Integer8Type({ qualifiedName: qualifiedName || name });
37284
37382
  case "F":
@@ -37568,13 +37666,14 @@ class DDIC {
37568
37666
  case "INT1":
37569
37667
  case "INT2":
37570
37668
  case "INT4":
37669
+ return Types.IntegerType.get({ qualifiedName: qualifiedName });
37571
37670
  case "INT8":
37572
- return new Types.IntegerType({ qualifiedName: qualifiedName });
37671
+ return new Types.Integer8Type({ qualifiedName: qualifiedName });
37573
37672
  case "SSTR": // 1 <= len <= 1333
37574
37673
  case "SSTRING": // 1 <= len <= 1333
37575
37674
  case "STRG": // 256 <= len
37576
37675
  case "STRING": // 256 <= len
37577
- return new Types.StringType({ qualifiedName: qualifiedName || "STRING" });
37676
+ return Types.StringType.get({ qualifiedName: qualifiedName });
37578
37677
  case "RSTR": // 256 <= len
37579
37678
  case "RAWSTRING": // 256 <= len
37580
37679
  case "GEOM_EWKB":
@@ -39038,6 +39137,9 @@ class LSPUtils {
39038
39137
  static tokenToRange(token) {
39039
39138
  return LServer.Range.create(token.getStart().getRow() - 1, token.getStart().getCol() - 1, token.getEnd().getRow() - 1, token.getEnd().getCol() - 1);
39040
39139
  }
39140
+ static positionToLS(pos) {
39141
+ return LServer.Position.create(pos.getRow() - 1, pos.getCol() - 1);
39142
+ }
39041
39143
  static identiferToLocation(identifier) {
39042
39144
  return {
39043
39145
  uri: identifier.getFilename(),
@@ -39197,7 +39299,7 @@ class CodeLens {
39197
39299
  constructor(reg) {
39198
39300
  this.reg = reg;
39199
39301
  }
39200
- list(textDocument) {
39302
+ list(textDocument, settings = { messageText: true }) {
39201
39303
  var _a;
39202
39304
  const file = _lsp_utils_1.LSPUtils.getABAPFile(this.reg, textDocument.uri);
39203
39305
  if (file === undefined) {
@@ -39209,14 +39311,22 @@ class CodeLens {
39209
39311
  }
39210
39312
  new syntax_1.SyntaxLogic(this.reg, obj).run();
39211
39313
  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;
39314
+ if (settings.messageText === true) {
39315
+ const list = this.reg.getMSAGReferences().listByFilename(file.getFilename());
39316
+ for (const l of list) {
39317
+ const msag = this.reg.getObject("MSAG", l.messageClass);
39318
+ if (msag === undefined) {
39319
+ continue;
39320
+ }
39321
+ const text = (_a = msag.getByNumber(l.number)) === null || _a === void 0 ? void 0 : _a.getMessage();
39322
+ if (text === undefined) {
39323
+ continue;
39324
+ }
39325
+ ret.push({
39326
+ range: _lsp_utils_1.LSPUtils.tokenToRange(l.token),
39327
+ command: LServer.Command.create(text, ""),
39328
+ });
39217
39329
  }
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
39330
  }
39221
39331
  return ret;
39222
39332
  }
@@ -39898,6 +40008,81 @@ exports.Implementation = Implementation;
39898
40008
 
39899
40009
  /***/ }),
39900
40010
 
40011
+ /***/ "./node_modules/@abaplint/core/build/src/lsp/inlay_hints.js":
40012
+ /*!******************************************************************!*\
40013
+ !*** ./node_modules/@abaplint/core/build/src/lsp/inlay_hints.js ***!
40014
+ \******************************************************************/
40015
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
40016
+
40017
+ "use strict";
40018
+
40019
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
40020
+ exports.InlayHints = void 0;
40021
+ const LServer = __webpack_require__(/*! vscode-languageserver-types */ "./node_modules/vscode-languageserver-types/lib/esm/main.js");
40022
+ const _lsp_utils_1 = __webpack_require__(/*! ./_lsp_utils */ "./node_modules/@abaplint/core/build/src/lsp/_lsp_utils.js");
40023
+ const syntax_1 = __webpack_require__(/*! ../abap/5_syntax/syntax */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/syntax.js");
40024
+ const _abap_object_1 = __webpack_require__(/*! ../objects/_abap_object */ "./node_modules/@abaplint/core/build/src/objects/_abap_object.js");
40025
+ const _reference_1 = __webpack_require__(/*! ../abap/5_syntax/_reference */ "./node_modules/@abaplint/core/build/src/abap/5_syntax/_reference.js");
40026
+ const _typed_identifier_1 = __webpack_require__(/*! ../abap/types/_typed_identifier */ "./node_modules/@abaplint/core/build/src/abap/types/_typed_identifier.js");
40027
+ const types_1 = __webpack_require__(/*! ../abap/types */ "./node_modules/@abaplint/core/build/src/abap/types/index.js");
40028
+ class InlayHints {
40029
+ constructor(reg) {
40030
+ this.reg = reg;
40031
+ }
40032
+ list(textDocument, settings = { inferredTypes: true }) {
40033
+ const file = _lsp_utils_1.LSPUtils.getABAPFile(this.reg, textDocument.uri);
40034
+ if (file === undefined) {
40035
+ return [];
40036
+ }
40037
+ const obj = this.reg.findObjectForFile(file);
40038
+ if (obj === undefined || !(obj instanceof _abap_object_1.ABAPObject)) {
40039
+ return [];
40040
+ }
40041
+ const top = new syntax_1.SyntaxLogic(this.reg, obj).run().spaghetti.getTop();
40042
+ const ret = [];
40043
+ if (settings.inferredTypes === true) {
40044
+ const implicit = this.findImplicitReferences(top);
40045
+ for (const i of implicit) {
40046
+ let label = undefined;
40047
+ if (i.resolved instanceof _typed_identifier_1.TypedIdentifier) {
40048
+ label = "TYPE " + i.resolved.getType().toABAP();
40049
+ }
40050
+ else if (i.resolved instanceof types_1.ClassDefinition) {
40051
+ label = "TYPE REF TO " + i.resolved.getName();
40052
+ }
40053
+ if (label === undefined) {
40054
+ continue;
40055
+ }
40056
+ ret.push({
40057
+ label: label,
40058
+ tooltip: "Inferred type",
40059
+ kind: LServer.InlayHintKind.Type,
40060
+ paddingLeft: true,
40061
+ paddingRight: true,
40062
+ position: _lsp_utils_1.LSPUtils.positionToLS(i.position.getEnd()),
40063
+ });
40064
+ }
40065
+ }
40066
+ return ret;
40067
+ }
40068
+ findImplicitReferences(node) {
40069
+ const ret = [];
40070
+ for (const r of node.getData().references) {
40071
+ if (r.referenceType === _reference_1.ReferenceType.InferredType) {
40072
+ ret.push(r);
40073
+ }
40074
+ }
40075
+ for (const c of node.getChildren()) {
40076
+ ret.push(...this.findImplicitReferences(c));
40077
+ }
40078
+ return ret;
40079
+ }
40080
+ }
40081
+ exports.InlayHints = InlayHints;
40082
+ //# sourceMappingURL=inlay_hints.js.map
40083
+
40084
+ /***/ }),
40085
+
39901
40086
  /***/ "./node_modules/@abaplint/core/build/src/lsp/language_server.js":
39902
40087
  /*!**********************************************************************!*\
39903
40088
  !*** ./node_modules/@abaplint/core/build/src/lsp/language_server.js ***!
@@ -39924,6 +40109,7 @@ const implementation_1 = __webpack_require__(/*! ./implementation */ "./node_mod
39924
40109
  const semantic_1 = __webpack_require__(/*! ./semantic */ "./node_modules/@abaplint/core/build/src/lsp/semantic.js");
39925
40110
  const statement_flow_1 = __webpack_require__(/*! ../abap/flow/statement_flow */ "./node_modules/@abaplint/core/build/src/abap/flow/statement_flow.js");
39926
40111
  const code_lens_1 = __webpack_require__(/*! ./code_lens */ "./node_modules/@abaplint/core/build/src/lsp/code_lens.js");
40112
+ const inlay_hints_1 = __webpack_require__(/*! ./inlay_hints */ "./node_modules/@abaplint/core/build/src/lsp/inlay_hints.js");
39927
40113
  // note Ranges are zero based in LSP,
39928
40114
  // https://github.com/microsoft/language-server-protocol/blob/main/versions/protocol-2-x.md#range
39929
40115
  // but 1 based in abaplint
@@ -40005,8 +40191,12 @@ class LanguageServer {
40005
40191
  return new semantic_1.SemanticHighlighting(this.reg).semanticTokensRange(range);
40006
40192
  }
40007
40193
  // 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);
40194
+ codeLens(textDocument, settings) {
40195
+ return new code_lens_1.CodeLens(this.reg).list(textDocument, settings);
40196
+ }
40197
+ // https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_inlayHint
40198
+ inlayHints(textDocument, settings) {
40199
+ return new inlay_hints_1.InlayHints(this.reg).list(textDocument, settings);
40010
40200
  }
40011
40201
  ////////////////////////////////////////
40012
40202
  // ______ _
@@ -47215,7 +47405,7 @@ class Registry {
47215
47405
  }
47216
47406
  static abaplintVersion() {
47217
47407
  // magic, see build script "version.sh"
47218
- return "2.101.11";
47408
+ return "2.101.15";
47219
47409
  }
47220
47410
  getDDICReferences() {
47221
47411
  return this.ddicReferences;
@@ -52304,6 +52494,10 @@ Make sure to test the downported code, it might not always be completely correct
52304
52494
  if (found) {
52305
52495
  return found;
52306
52496
  }
52497
+ found = this.downportReadTable(high, lowFile, highSyntax);
52498
+ if (found) {
52499
+ return found;
52500
+ }
52307
52501
  return undefined;
52308
52502
  }
52309
52503
  //////////////////////////////////////////
@@ -52459,6 +52653,10 @@ Make sure to test the downported code, it might not always be completely correct
52459
52653
  else if (fieldList.concatTokens().toUpperCase() === "COUNT( * )") {
52460
52654
  fieldDefinition = `DATA ${name} TYPE i.`;
52461
52655
  }
52656
+ else if (fieldList.concatTokens().toUpperCase() === "@ABAP_TRUE"
52657
+ || fieldList.concatTokens().toUpperCase() === "@ABAP_FALSE") {
52658
+ fieldDefinition = `DATA ${name} TYPE abap_bool.`;
52659
+ }
52462
52660
  else if (fieldList.getChildren().length === 1 && fieldList.getChildren()[0].get() instanceof Expressions.SQLAggregation) {
52463
52661
  const c = fieldList.getChildren()[0];
52464
52662
  if (c instanceof nodes_1.ExpressionNode) {
@@ -52599,6 +52797,22 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
52599
52797
  }
52600
52798
  return undefined;
52601
52799
  }
52800
+ downportReadTable(high, lowFile, highSyntax) {
52801
+ if (!(high.get() instanceof Statements.ReadTable)) {
52802
+ return undefined;
52803
+ }
52804
+ const source = high.findExpressionAfterToken("TABLE");
52805
+ if ((source === null || source === void 0 ? void 0 : source.get()) instanceof Expressions.Source) {
52806
+ const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
52807
+ const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
52808
+ const firstToken = high.getFirstToken();
52809
+ const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, firstToken.getStart(), `DATA(${uniqueName}) = ${source.concatTokens()}.\n` + indentation);
52810
+ const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, source.getFirstToken().getStart(), source.getLastToken().getEnd(), uniqueName);
52811
+ const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
52812
+ return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Outline table source", this.getMetadata().key, this.conf.severity, fix);
52813
+ }
52814
+ return undefined;
52815
+ }
52602
52816
  replaceInsertExpression(high, lowFile, highSyntax) {
52603
52817
  if (!(high.get() instanceof Statements.InsertInternal)) {
52604
52818
  return undefined;
@@ -81699,7 +81913,7 @@ function readDocType(xmlData, i){
81699
81913
  i += 7;
81700
81914
  [entityName, val,i] = readEntityExp(xmlData,i+1);
81701
81915
  if(val.indexOf("&") === -1) //Parameter entities are not supported
81702
- entities[ entityName ] = {
81916
+ entities[ validateEntityName(entityName) ] = {
81703
81917
  regx : RegExp( `&${entityName};`,"g"),
81704
81918
  val: val
81705
81919
  };
@@ -81820,6 +82034,18 @@ function isNotation(xmlData, i){
81820
82034
  return false
81821
82035
  }
81822
82036
 
82037
+ //an entity name should not contains special characters that may be used in regex
82038
+ //Eg !?\\\/[]$%{}^&*()<>
82039
+ const specialChar = "!?\\\/[]$%{}^&*()<>|+";
82040
+
82041
+ function validateEntityName(name){
82042
+ for (let i = 0; i < specialChar.length; i++) {
82043
+ const ch = specialChar[i];
82044
+ if(name.indexOf(ch) !== -1) throw new Error(`Invalid character ${ch} in entity name`);
82045
+ }
82046
+ return name;
82047
+ }
82048
+
81823
82049
  module.exports = readDocType;
81824
82050
 
81825
82051
  /***/ }),