@abaplint/core 2.113.152 → 2.113.154

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.
@@ -2374,10 +2374,12 @@ declare namespace Expressions {
2374
2374
  LoopGroupByComponent,
2375
2375
  LoopGroupByTarget,
2376
2376
  LoopGroupBy,
2377
+ LoopSource,
2377
2378
  LoopTarget,
2378
2379
  MacroName,
2379
2380
  MessageClass_2 as MessageClass,
2380
2381
  MessageNumber,
2382
+ MessageSourceSource,
2381
2383
  MessageSource,
2382
2384
  MessageTypeAndNumber,
2383
2385
  MethodCallBody,
@@ -2412,6 +2414,7 @@ declare namespace Expressions {
2412
2414
  PerformChanging,
2413
2415
  PerformTables,
2414
2416
  PerformUsing,
2417
+ ProvideFieldName,
2415
2418
  RadioGroupName,
2416
2419
  RaiseWith,
2417
2420
  ReadTableTarget,
@@ -2455,7 +2458,6 @@ declare namespace Expressions {
2455
2458
  SQLForAllEntries,
2456
2459
  SQLFromSource,
2457
2460
  SQLFrom,
2458
- ProvideFieldName,
2459
2461
  SQLFunctionInput,
2460
2462
  SQLFunction,
2461
2463
  SQLGroupBy,
@@ -4307,6 +4309,10 @@ declare class LoopGroupByTarget extends Expression {
4307
4309
  getRunnable(): IStatementRunnable;
4308
4310
  }
4309
4311
 
4312
+ declare class LoopSource extends Expression {
4313
+ getRunnable(): IStatementRunnable;
4314
+ }
4315
+
4310
4316
  declare class LoopTarget extends Expression {
4311
4317
  getRunnable(): IStatementRunnable;
4312
4318
  }
@@ -4394,6 +4400,10 @@ declare class MessageSource extends Expression {
4394
4400
  getRunnable(): IStatementRunnable;
4395
4401
  }
4396
4402
 
4403
+ declare class MessageSourceSource extends Expression {
4404
+ getRunnable(): IStatementRunnable;
4405
+ }
4406
+
4397
4407
  declare class MessageTypeAndNumber extends Expression {
4398
4408
  getRunnable(): IStatementRunnable;
4399
4409
  }
@@ -108,10 +108,12 @@ __exportStar(require("./lob_handle"), exports);
108
108
  __exportStar(require("./loop_group_by_component"), exports);
109
109
  __exportStar(require("./loop_group_by_target"), exports);
110
110
  __exportStar(require("./loop_group_by"), exports);
111
+ __exportStar(require("./loop_source"), exports);
111
112
  __exportStar(require("./loop_target"), exports);
112
113
  __exportStar(require("./macro_name"), exports);
113
114
  __exportStar(require("./message_class"), exports);
114
115
  __exportStar(require("./message_number"), exports);
116
+ __exportStar(require("./message_source_source"), exports);
115
117
  __exportStar(require("./message_source"), exports);
116
118
  __exportStar(require("./message_type_and_number"), exports);
117
119
  __exportStar(require("./method_call_body"), exports);
@@ -146,6 +148,7 @@ __exportStar(require("./pass_by_value"), exports);
146
148
  __exportStar(require("./perform_changing"), exports);
147
149
  __exportStar(require("./perform_tables"), exports);
148
150
  __exportStar(require("./perform_using"), exports);
151
+ __exportStar(require("./provide_field_name"), exports);
149
152
  __exportStar(require("./radio_group_name"), exports);
150
153
  __exportStar(require("./raise_with"), exports);
151
154
  __exportStar(require("./read_table_target"), exports);
@@ -189,7 +192,6 @@ __exportStar(require("./sql_fields"), exports);
189
192
  __exportStar(require("./sql_for_all_entries"), exports);
190
193
  __exportStar(require("./sql_from_source"), exports);
191
194
  __exportStar(require("./sql_from"), exports);
192
- __exportStar(require("./provide_field_name"), exports);
193
195
  __exportStar(require("./sql_function_input"), exports);
194
196
  __exportStar(require("./sql_function"), exports);
195
197
  __exportStar(require("./sql_group_by"), exports);
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoopSource = void 0;
4
+ const combi_1 = require("../combi");
5
+ const _1 = require(".");
6
+ const version_1 = require("../../../version");
7
+ class LoopSource extends combi_1.Expression {
8
+ getRunnable() {
9
+ return (0, combi_1.alt)(_1.SimpleSource2, (0, combi_1.ver)(version_1.Version.v740sp02, _1.Source, version_1.Version.OpenABAP));
10
+ }
11
+ }
12
+ exports.LoopSource = LoopSource;
13
+ //# sourceMappingURL=loop_source.js.map
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MessageSourceSource = void 0;
4
+ const combi_1 = require("../combi");
5
+ const _1 = require(".");
6
+ const version_1 = require("../../../version");
7
+ class MessageSourceSource extends combi_1.Expression {
8
+ getRunnable() {
9
+ return (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp02, _1.Source), _1.SimpleSource3);
10
+ }
11
+ }
12
+ exports.MessageSourceSource = MessageSourceSource;
13
+ //# sourceMappingURL=message_source_source.js.map
@@ -26,7 +26,7 @@ class Source extends combi_1.Expression {
26
26
  const prefix = (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.WPlus), "BIT-NOT");
27
27
  const old = (0, combi_1.seq)((0, combi_1.optPrio)(prefix), (0, combi_1.altPrio)(_1.Constant, _1.StringTemplate, text_element_1.TextElement, bool, method, (0, combi_1.seq)(_1.FieldChain, deref), paren), (0, combi_1.optPrio)(after));
28
28
  const corr = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CORRESPONDING", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CorrespondingBody, rparen, (0, combi_1.optPrio)(after)));
29
- const conv = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("CONV", _1.TypeNameOrInfer, lparenNoSpace, _1.ConvBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
29
+ const conv = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("CONV", _1.TypeNameOrInfer, lparenNoSpace, _1.ConvBody, rparenNoSpace, (0, combi_1.optPrio)(after)), version_1.Version.OpenABAP);
30
30
  const swit = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("SWITCH", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.SwitchBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
31
31
  const value = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("VALUE", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.ValueBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
32
32
  const cond = (0, combi_1.ver)(version_1.Version.v740sp02, (0, combi_1.seq)("COND", _1.TypeNameOrInfer, (0, combi_1.tok)(tokens_1.ParenLeftW), _1.CondBody, rparenNoSpace, (0, combi_1.optPrio)(after)));
@@ -8,7 +8,7 @@ class TypeTableKey extends combi_1.Expression {
8
8
  getRunnable() {
9
9
  const uniqueness = (0, combi_1.alt)("NON-UNIQUE", "UNIQUE");
10
10
  const defaultKey = "DEFAULT KEY";
11
- const emptyKey = (0, combi_1.ver)(version_1.Version.v740sp02, "EMPTY KEY");
11
+ const emptyKey = (0, combi_1.ver)(version_1.Version.v740sp02, "EMPTY KEY", version_1.Version.OpenABAP);
12
12
  const components = (0, combi_1.plus)((0, combi_1.alt)((0, combi_1.seq)("WITH", (0, combi_1.failStar)()), _1.FieldSub));
13
13
  const further = (0, combi_1.seq)((0, combi_1.alt)("WITHOUT", "WITH"), "FURTHER SECONDARY KEYS");
14
14
  const alias = (0, combi_1.seq)("ALIAS", _1.Field);
@@ -4,7 +4,6 @@ exports.Loop = void 0;
4
4
  const combi_1 = require("../combi");
5
5
  const expressions_1 = require("../expressions");
6
6
  const version_1 = require("../../../version");
7
- const simple_source2_1 = require("../expressions/simple_source2");
8
7
  const loop_group_by_1 = require("../expressions/loop_group_by");
9
8
  class Loop {
10
9
  getMatcher() {
@@ -15,7 +14,7 @@ class Loop {
15
14
  const to = (0, combi_1.seq)("TO", expressions_1.Source);
16
15
  const usingKey = (0, combi_1.seq)("USING KEY", (0, combi_1.altPrio)(expressions_1.SimpleName, expressions_1.Dynamic));
17
16
  const options = (0, combi_1.per)(expressions_1.LoopTarget, from, to, where, usingKey, group, step);
18
- const at = (0, combi_1.seq)("AT", (0, combi_1.opt)((0, combi_1.seq)("SCREEN", (0, combi_1.failCombinator)())), (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp08, "GROUP")), (0, combi_1.alt)(simple_source2_1.SimpleSource2, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source)), (0, combi_1.opt)(options));
17
+ const at = (0, combi_1.seq)("AT", (0, combi_1.opt)((0, combi_1.seq)("SCREEN", (0, combi_1.failCombinator)())), (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp08, "GROUP")), expressions_1.LoopSource, (0, combi_1.opt)(options));
19
18
  return (0, combi_1.seq)("LOOP", (0, combi_1.opt)(at));
20
19
  }
21
20
  }
@@ -6,17 +6,16 @@ const expressions_1 = require("../expressions");
6
6
  const version_1 = require("../../../version");
7
7
  class Message {
8
8
  getMatcher() {
9
- const s = (0, combi_1.alt)((0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source), expressions_1.SimpleSource3);
10
9
  const like = (0, combi_1.seq)("DISPLAY LIKE", expressions_1.Source);
11
10
  const into = (0, combi_1.seq)("INTO", expressions_1.Target);
12
11
  const raising = (0, combi_1.seq)("RAISING", expressions_1.ExceptionName);
13
12
  const options = (0, combi_1.per)(like, into, raising);
14
13
  const type = (0, combi_1.seq)("TYPE", expressions_1.Source);
15
- const sou = (0, combi_1.altPrio)(options, s);
16
- const sourc = (0, combi_1.alt)(sou, (0, combi_1.seq)(s, sou), (0, combi_1.seq)(s, s, sou), (0, combi_1.seq)(s, s, s, options));
17
- const mwith = (0, combi_1.seq)("WITH", s, (0, combi_1.opt)(sourc));
14
+ const sou = (0, combi_1.altPrio)(options, expressions_1.MessageSourceSource);
15
+ const sourc = (0, combi_1.alt)(sou, (0, combi_1.seq)(expressions_1.MessageSourceSource, sou), (0, combi_1.seq)(expressions_1.MessageSourceSource, expressions_1.MessageSourceSource, sou), (0, combi_1.seq)(expressions_1.MessageSourceSource, expressions_1.MessageSourceSource, expressions_1.MessageSourceSource, options));
16
+ const mwith = (0, combi_1.seq)("WITH", expressions_1.MessageSourceSource, (0, combi_1.opt)(sourc));
18
17
  const foo = (0, combi_1.seq)(expressions_1.MessageSource, (0, combi_1.opt)(options), (0, combi_1.opt)(mwith));
19
- const text = (0, combi_1.seq)(s, type, (0, combi_1.optPrio)(like), (0, combi_1.optPrio)(raising));
18
+ const text = (0, combi_1.seq)(expressions_1.MessageSourceSource, type, (0, combi_1.optPrio)(like), (0, combi_1.optPrio)(raising));
20
19
  const cloud1 = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.seq)("WITH", expressions_1.Source, (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)(expressions_1.Source))), (0, combi_1.altPrio)(into, raising));
21
20
  const cloud2 = (0, combi_1.seq)((0, combi_1.altPrio)(into, raising), (0, combi_1.opt)((0, combi_1.seq)("WITH", expressions_1.Source, (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)(expressions_1.Source), (0, combi_1.opt)(expressions_1.Source))));
22
21
  const cloud = (0, combi_1.seq)(expressions_1.MessageSource, (0, combi_1.alt)(cloud1, cloud2));
@@ -14,6 +14,7 @@ const loop_group_by_1 = require("../expressions/loop_group_by");
14
14
  const _syntax_input_1 = require("../_syntax_input");
15
15
  class Loop {
16
16
  runSyntax(node, input) {
17
+ var _a;
17
18
  const loopTarget = node.findDirectExpression(Expressions.LoopTarget);
18
19
  let target = loopTarget === null || loopTarget === void 0 ? void 0 : loopTarget.findDirectExpression(Expressions.Target);
19
20
  const targetType = target ? target_1.Target.runSyntax(target, input) : undefined;
@@ -22,7 +23,7 @@ class Loop {
22
23
  }
23
24
  const write = (loopTarget === null || loopTarget === void 0 ? void 0 : loopTarget.findDirectTokenByText("ASSIGNING")) !== undefined;
24
25
  const sources = node.findDirectExpressions(Expressions.Source);
25
- let firstSource = node.findDirectExpression(Expressions.SimpleSource2);
26
+ let firstSource = (_a = node.findDirectExpression(Expressions.LoopSource)) === null || _a === void 0 ? void 0 : _a.getFirstChild();
26
27
  if (firstSource === undefined) {
27
28
  firstSource = sources[0];
28
29
  }
@@ -17,6 +17,14 @@ class Message {
17
17
  else if (found) {
18
18
  target_1.Target.runSyntax(found, input);
19
19
  }
20
+ for (const mss of node.findDirectExpressions(Expressions.MessageSourceSource)) {
21
+ for (const s of mss.findDirectExpressions(Expressions.Source)) {
22
+ source_1.Source.runSyntax(s, input);
23
+ }
24
+ for (const s of mss.findDirectExpressions(Expressions.SimpleSource3)) {
25
+ source_1.Source.runSyntax(s, input);
26
+ }
27
+ }
20
28
  for (const s of node.findDirectExpressions(Expressions.Source)) {
21
29
  source_1.Source.runSyntax(s, input);
22
30
  }
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.152";
70
+ return "2.113.154";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -932,11 +932,14 @@ ${indentation}${uniqueName} = ${source.concatTokens()}.\n${indentation}`);
932
932
  return undefined;
933
933
  }
934
934
  downportMessageSource(high, lowFile, highSyntax) {
935
+ var _a;
935
936
  if (!(high.get() instanceof Statements.Message)) {
936
937
  return undefined;
937
938
  }
938
939
  const source = high.findExpressionAfterToken("MESSAGE");
939
- if ((source === null || source === void 0 ? void 0 : source.get()) instanceof Expressions.Source) {
940
+ if ((source === null || source === void 0 ? void 0 : source.get()) instanceof Expressions.MessageSourceSource
941
+ && ((_a = source.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.Source) {
942
+ ;
940
943
  const uniqueName = this.uniqueName(high.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
941
944
  const indentation = " ".repeat(high.getFirstToken().getStart().getCol() - 1);
942
945
  const firstToken = high.getFirstToken();
@@ -1251,7 +1254,7 @@ ${indentation}${uniqueName2}->if_t100_message~t100key = ${uniqueName1}.\n`;
1251
1254
  }
1252
1255
  abap += `${indentation}RAISE EXCEPTION ${uniqueName2}.`;
1253
1256
  const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), abap);
1254
- return issue_1.Issue.atToken(lowFile, startToken, "Downport RAISE MESSAGE", this.getMetadata().key, this.conf.severity, fix);
1257
+ return issue_1.Issue.atToken(lowFile, startToken, "Downport RAISE EXCEPTION MESSAGE", this.getMetadata().key, this.conf.severity, fix);
1255
1258
  }
1256
1259
  emptyKey(low, node, lowFile) {
1257
1260
  if (!(low.get() instanceof _statement_1.Unknown)) {
@@ -1795,17 +1798,18 @@ ${indentation} output = ${uniqueName}.\n`;
1795
1798
  return undefined;
1796
1799
  }
1797
1800
  outlineLoopInput(low, high, lowFile, highSyntax) {
1801
+ var _a, _b;
1798
1802
  if (!(low.get() instanceof _statement_1.Unknown)) {
1799
1803
  return undefined;
1800
1804
  }
1801
1805
  else if (!(high.get() instanceof Statements.Loop)) {
1802
1806
  return undefined;
1803
1807
  }
1804
- else if (high.findDirectExpression(Expressions.SimpleSource2)) {
1808
+ else if ((_a = high.findDirectExpression(Expressions.LoopSource)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.SimpleSource2)) {
1805
1809
  return undefined;
1806
1810
  }
1807
1811
  // the first Source must be outlined
1808
- const s = high.findDirectExpression(Expressions.Source);
1812
+ const s = (_b = high.findDirectExpression(Expressions.LoopSource)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.Source);
1809
1813
  if (s === undefined) {
1810
1814
  return undefined;
1811
1815
  }
@@ -1818,12 +1822,12 @@ ${indentation} output = ${uniqueName}.\n`;
1818
1822
  return issue_1.Issue.atToken(lowFile, high.getFirstToken(), "Outline LOOP input", this.getMetadata().key, this.conf.severity, fix);
1819
1823
  }
1820
1824
  outlineLoopTarget(node, lowFile, highSyntax) {
1821
- var _a, _b, _c, _d, _e, _f;
1825
+ var _a, _b, _c, _d, _e, _f, _g;
1822
1826
  // also allows outlining of voided types
1823
1827
  if (!(node.get() instanceof Statements.Loop)) {
1824
1828
  return undefined;
1825
1829
  }
1826
- const source = node.findDirectExpression(Expressions.SimpleSource2);
1830
+ const source = (_a = node.findDirectExpression(Expressions.LoopSource)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.SimpleSource2);
1827
1831
  if (source === undefined) {
1828
1832
  return undefined;
1829
1833
  }
@@ -1842,9 +1846,9 @@ ${indentation} output = ${uniqueName}.\n`;
1842
1846
  }
1843
1847
  const isReference = concat.includes(" REFERENCE INTO ");
1844
1848
  const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
1845
- const dataTarget = (_b = (_a = node.findDirectExpression(Expressions.LoopTarget)) === null || _a === void 0 ? void 0 : _a.findDirectExpression(Expressions.Target)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.InlineData);
1849
+ const dataTarget = (_c = (_b = node.findDirectExpression(Expressions.LoopTarget)) === null || _b === void 0 ? void 0 : _b.findDirectExpression(Expressions.Target)) === null || _c === void 0 ? void 0 : _c.findDirectExpression(Expressions.InlineData);
1846
1850
  if (dataTarget) {
1847
- const targetName = ((_c = dataTarget.findDirectExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "DOWNPORT_ERROR";
1851
+ const targetName = ((_d = dataTarget.findDirectExpression(Expressions.TargetField)) === null || _d === void 0 ? void 0 : _d.concatTokens()) || "DOWNPORT_ERROR";
1848
1852
  let code = `DATA ${targetName} LIKE LINE OF ${sourceName}.\n${indentation}`;
1849
1853
  if (isReference) {
1850
1854
  const likeName = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
@@ -1855,9 +1859,9 @@ ${indentation} output = ${uniqueName}.\n`;
1855
1859
  const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
1856
1860
  return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline LOOP data target", this.getMetadata().key, this.conf.severity, fix);
1857
1861
  }
1858
- const fsTarget = (_e = (_d = node.findDirectExpression(Expressions.LoopTarget)) === null || _d === void 0 ? void 0 : _d.findDirectExpression(Expressions.FSTarget)) === null || _e === void 0 ? void 0 : _e.findDirectExpression(Expressions.InlineFS);
1862
+ const fsTarget = (_f = (_e = node.findDirectExpression(Expressions.LoopTarget)) === null || _e === void 0 ? void 0 : _e.findDirectExpression(Expressions.FSTarget)) === null || _f === void 0 ? void 0 : _f.findDirectExpression(Expressions.InlineFS);
1859
1863
  if (fsTarget) {
1860
- const targetName = ((_f = fsTarget.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _f === void 0 ? void 0 : _f.concatTokens()) || "DOWNPORT_ERROR";
1864
+ const targetName = ((_g = fsTarget.findDirectExpression(Expressions.TargetFieldSymbol)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "DOWNPORT_ERROR";
1861
1865
  let type = `LIKE LINE OF ${sourceName}`;
1862
1866
  const f = foundType === null || foundType === void 0 ? void 0 : foundType.getType();
1863
1867
  if (f instanceof basic_1.TableType && f.getRowType() instanceof basic_1.AnyType) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.152",
3
+ "version": "2.113.154",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",