@abaplint/cli 2.113.63 → 2.113.65

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/cli.js +30 -25
  2. package/package.json +2 -2
package/build/cli.js CHANGED
@@ -5279,7 +5279,7 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
5279
5279
  const table_body_1 = __webpack_require__(/*! ./table_body */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/table_body.js");
5280
5280
  class FieldSub extends combi_1.Expression {
5281
5281
  getRunnable() {
5282
- const ret = (0, combi_1.seq)((0, combi_1.regex)(/^\*?!?(\/\w+\/)?[a-zA-Z_%$\?][\w%$\$\*]*$/), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^[\w%$\$\*]+$/))), (0, combi_1.opt)(table_body_1.TableBody));
5282
+ const ret = (0, combi_1.seq)((0, combi_1.regex)(/^\*?!?&?(\/\w+\/)?[a-zA-Z_%$\?][\w%$\$\*]*$/), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^[\w%$\$\*]+$/))), (0, combi_1.opt)(table_body_1.TableBody));
5283
5283
  return ret;
5284
5284
  }
5285
5285
  }
@@ -6417,7 +6417,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
6417
6417
  class MessageClass extends combi_1.Expression {
6418
6418
  getRunnable() {
6419
6419
  // "&1" can be used for almost anything(field names, method names etc.) in macros
6420
- return (0, combi_1.seq)((0, combi_1.regex)(/^>?[\w\/]+#?@?\/?!?&?>?\$?\??<?$/), (0, combi_1.starPrio)((0, combi_1.tok)(tokens_1.PlusW)), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)((0, combi_1.regex)(/^\w+$/)))), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.DashW)));
6420
+ return (0, combi_1.seq)((0, combi_1.regex)(/^>?[\w\/]+#?@?\/?!?&?>?\$?\??<?$/), (0, combi_1.starPrio)((0, combi_1.tok)(tokens_1.Plus)), (0, combi_1.starPrio)((0, combi_1.tok)(tokens_1.PlusW)), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)((0, combi_1.regex)(/^\w+$/)))), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.DashW)));
6421
6421
  }
6422
6422
  }
6423
6423
  exports.MessageClass = MessageClass;
@@ -9480,7 +9480,8 @@ class TypeTableKey extends combi_1.Expression {
9480
9480
  const emptyKey = (0, combi_1.ver)(version_1.Version.v740sp02, "EMPTY KEY");
9481
9481
  const components = (0, combi_1.plus)((0, combi_1.alt)((0, combi_1.seq)("WITH", (0, combi_1.failStar)()), _1.FieldSub));
9482
9482
  const further = (0, combi_1.seq)((0, combi_1.alt)("WITHOUT", "WITH"), "FURTHER SECONDARY KEYS");
9483
- const key = (0, combi_1.seq)("WITH", (0, combi_1.opt)(uniqueness), (0, combi_1.altPrio)(defaultKey, emptyKey, (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("SORTED", "HASHED")), "KEY", (0, combi_1.alt)((0, combi_1.seq)(_1.Field, "COMPONENTS", components), components))), (0, combi_1.optPrio)(further), (0, combi_1.optPrio)("READ-ONLY"));
9483
+ const alias = (0, combi_1.seq)("ALIAS", _1.Field);
9484
+ const key = (0, combi_1.seq)("WITH", (0, combi_1.opt)(uniqueness), (0, combi_1.altPrio)(defaultKey, emptyKey, (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.alt)("SORTED", "HASHED")), "KEY", (0, combi_1.alt)((0, combi_1.seq)(_1.Field, (0, combi_1.opt)(alias), "COMPONENTS", components), components))), (0, combi_1.optPrio)(further), (0, combi_1.optPrio)("READ-ONLY"));
9484
9485
  return key;
9485
9486
  }
9486
9487
  }
@@ -10042,7 +10043,8 @@ const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/
10042
10043
  class Add {
10043
10044
  getMatcher() {
10044
10045
  const to = (0, combi_1.seq)("TO", expressions_1.Target);
10045
- const giving = (0, combi_1.seq)("GIVING", expressions_1.FieldSub);
10046
+ const accordingTo = (0, combi_1.seq)("ACCORDING TO", expressions_1.FieldSub);
10047
+ const giving = (0, combi_1.seq)("GIVING", expressions_1.FieldSub, (0, combi_1.opt)(accordingTo));
10046
10048
  const then = (0, combi_1.seq)("THEN", expressions_1.FieldSub, "UNTIL", expressions_1.FieldSub, (0, combi_1.alt)(giving, to));
10047
10049
  const ret = (0, combi_1.seq)("ADD", expressions_1.Source, (0, combi_1.altPrio)(to, then));
10048
10050
  return ret;
@@ -10572,7 +10574,7 @@ class CallDialog {
10572
10574
  const exporting = (0, combi_1.seq)("EXPORTING", (0, combi_1.plus)(from));
10573
10575
  const to = (0, combi_1.seq)(expressions_1.Field, (0, combi_1.optPrio)((0, combi_1.seq)("TO", expressions_1.Field)));
10574
10576
  const importing = (0, combi_1.seq)("IMPORTING", (0, combi_1.plus)(to));
10575
- const ret = (0, combi_1.seq)("CALL DIALOG", expressions_1.Constant, (0, combi_1.opt)(exporting), (0, combi_1.opt)(importing));
10577
+ const ret = (0, combi_1.seq)("CALL DIALOG", (0, combi_1.alt)(expressions_1.Constant, expressions_1.FieldSub), (0, combi_1.opt)(exporting), (0, combi_1.opt)(importing));
10576
10578
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
10577
10579
  }
10578
10580
  }
@@ -10882,7 +10884,7 @@ const combi_1 = __webpack_require__(/*! ../combi */ "./node_modules/@abaplint/co
10882
10884
  const expressions_1 = __webpack_require__(/*! ../expressions */ "./node_modules/@abaplint/core/build/src/abap/2_statements/expressions/index.js");
10883
10885
  class Check {
10884
10886
  getMatcher() {
10885
- const ret = (0, combi_1.seq)("CHECK", (0, combi_1.altPrio)(expressions_1.Cond, expressions_1.Field));
10887
+ const ret = (0, combi_1.seq)("CHECK", (0, combi_1.altPrio)(expressions_1.Cond, expressions_1.FieldSub));
10886
10888
  return ret;
10887
10889
  }
10888
10890
  }
@@ -14976,7 +14978,7 @@ const tokens_1 = __webpack_require__(/*! ../../1_lexer/tokens */ "./node_modules
14976
14978
  class Move {
14977
14979
  getMatcher() {
14978
14980
  const mov = (0, combi_1.verNot)(version_1.Version.Cloud, "MOVE");
14979
- const move = (0, combi_1.seq)(mov, (0, combi_1.altPrio)((0, combi_1.seq)("EXACT", expressions_1.Source, "TO", expressions_1.Target), (0, combi_1.seq)(expressions_1.Source, (0, combi_1.altPrio)("?TO", "TO"), expressions_1.Target)), (0, combi_1.opt)((0, combi_1.seq)("PERCENTAGE", expressions_1.Source)));
14981
+ const move = (0, combi_1.seq)(mov, (0, combi_1.altPrio)((0, combi_1.seq)("EXACT", expressions_1.Source, "TO", expressions_1.Target), (0, combi_1.seq)(expressions_1.Source, (0, combi_1.altPrio)("?TO", "TO"), expressions_1.Target)), (0, combi_1.opt)((0, combi_1.seq)("PERCENTAGE", expressions_1.Source, (0, combi_1.opt)((0, combi_1.alt)("LEFT", "RIGHT")))));
14980
14982
  const calcAssign = (0, combi_1.ver)(version_1.Version.v754, (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.WPlus), "="), (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WDash), "="), "/=", "*=", "&&="));
14981
14983
  const chained = (0, combi_1.seq)("=", (0, combi_1.star)((0, combi_1.seq)(expressions_1.Target, "=")));
14982
14984
  const equals = (0, combi_1.altPrio)((0, combi_1.altPrio)(chained, "?="), calcAssign);
@@ -15097,7 +15099,7 @@ class NewPage {
15097
15099
  const dataset = (0, combi_1.seq)("LIST DATASET", expressions_1.Source);
15098
15100
  const name = (0, combi_1.seq)("LIST NAME", expressions_1.Source);
15099
15101
  const newList = (0, combi_1.seq)("NEW LIST IDENTIFICATION", expressions_1.Source);
15100
- const ret = (0, combi_1.seq)("NEW-PAGE", (0, combi_1.opt)((0, combi_1.per)(print, (0, combi_1.alt)("NO-TITLE", "WITH-TITLE"), (0, combi_1.alt)("NO-HEADING", "WITH-HEADING"), "NO DIALOG", parameters, listAuth, immediately, dataset, coverPage, newList, keep, department, name, layout, destination, receiver, copies, coverText, archive, "NEW-SECTION", lineCount, line)));
15102
+ const ret = (0, combi_1.seq)("NEW-PAGE", (0, combi_1.opt)((0, combi_1.per)(print, (0, combi_1.alt)("NO-TITLE", "WITH-TITLE"), (0, combi_1.alt)("NO-HEADING", "WITH-HEADING"), "NO DIALOG", "NO-TOPOFPAGE", parameters, listAuth, immediately, dataset, coverPage, newList, keep, department, name, layout, destination, receiver, copies, coverText, archive, "NEW-SECTION", lineCount, line)));
15101
15103
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15102
15104
  }
15103
15105
  }
@@ -15295,7 +15297,7 @@ class Parameter {
15295
15297
  const decimals = (0, combi_1.seq)("DECIMALS", expressions_1.Source);
15296
15298
  const forTable = (0, combi_1.seq)("FOR TABLE", expressions_1.DatabaseTable, (0, combi_1.opt)("VALUE-REQUEST"));
15297
15299
  const perm = (0, combi_1.per)(type, def, "OBLIGATORY", match, cmd, length, decimals, radio, memory, modif, listbox, visible, forTable, "VALUE CHECK", "NO-DISPLAY", "AS CHECKBOX", "LOWER CASE");
15298
- const ret = (0, combi_1.seq)(para, expressions_1.FieldSub, (0, combi_1.opt)(expressions_1.FieldLength), (0, combi_1.opt)(perm));
15300
+ const ret = (0, combi_1.seq)(para, expressions_1.FieldSub, (0, combi_1.opt)(expressions_1.ConstantFieldLength), (0, combi_1.opt)(perm));
15299
15301
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15300
15302
  }
15301
15303
  }
@@ -34296,6 +34298,9 @@ class Data {
34296
34298
  if (found instanceof Basic.UnknownType) {
34297
34299
  return new _typed_identifier_1.TypedIdentifier(name, input.filename, new Basic.UnknownType("unknown type, " + typeName));
34298
34300
  }
34301
+ if (found instanceof Basic.TableType && found.isWithHeader()) {
34302
+ found = found.getRowType();
34303
+ }
34299
34304
  if (!(found instanceof Basic.StructureType)) {
34300
34305
  const message = "not structured, " + typeName;
34301
34306
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, typeToken, message));
@@ -35586,7 +35591,7 @@ class StatementFlow {
35586
35591
  return ((_a = f.findDirectStructure(Structures.Body)) === null || _a === void 0 ? void 0 : _a.getChildren()) || [];
35587
35592
  }
35588
35593
  // note: it must handle macros and chained statements
35589
- buildName(statement) {
35594
+ static buildName(statement) {
35590
35595
  let token = undefined;
35591
35596
  const colon = statement.getColon();
35592
35597
  if (colon === undefined) {
@@ -35624,7 +35629,7 @@ class StatementFlow {
35624
35629
  if (c.get() instanceof Structures.Normal) {
35625
35630
  const firstChild = c.getFirstChild(); // "Normal" only has one child
35626
35631
  if (firstChild instanceof nodes_1.StatementNode) {
35627
- const name = this.buildName(firstChild);
35632
+ const name = StatementFlow.buildName(firstChild);
35628
35633
  graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35629
35634
  current = name;
35630
35635
  if (firstChild.get() instanceof Statements.Check) {
@@ -35673,7 +35678,7 @@ class StatementFlow {
35673
35678
  let current = graph.getStart();
35674
35679
  const type = n.get();
35675
35680
  if (type instanceof Structures.If) {
35676
- const ifName = this.buildName(n.findDirectStatement(Statements.If));
35681
+ const ifName = StatementFlow.buildName(n.findDirectStatement(Statements.If));
35677
35682
  const sub = this.traverseBody(this.findBody(n), context);
35678
35683
  graph.addEdge(current, ifName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35679
35684
  graph.addGraph(ifName, sub, flow_graph_1.FLOW_EDGE_TYPE.true);
@@ -35684,7 +35689,7 @@ class StatementFlow {
35684
35689
  if (elseifst === undefined) {
35685
35690
  continue;
35686
35691
  }
35687
- const elseIfName = this.buildName(elseifst);
35692
+ const elseIfName = StatementFlow.buildName(elseifst);
35688
35693
  const sub = this.traverseBody(this.findBody(e), context);
35689
35694
  graph.addEdge(current, elseIfName, flow_graph_1.FLOW_EDGE_TYPE.false);
35690
35695
  graph.addGraph(elseIfName, sub, flow_graph_1.FLOW_EDGE_TYPE.true);
@@ -35694,7 +35699,7 @@ class StatementFlow {
35694
35699
  const els = n.findDirectStructure(Structures.Else);
35695
35700
  const elsest = els === null || els === void 0 ? void 0 : els.findDirectStatement(Statements.Else);
35696
35701
  if (els && elsest) {
35697
- const elseName = this.buildName(elsest);
35702
+ const elseName = StatementFlow.buildName(elsest);
35698
35703
  const sub = this.traverseBody(this.findBody(els), context);
35699
35704
  graph.addEdge(current, elseName, flow_graph_1.FLOW_EDGE_TYPE.false);
35700
35705
  graph.addGraph(elseName, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -35711,7 +35716,7 @@ class StatementFlow {
35711
35716
  || type instanceof Structures.Select
35712
35717
  || type instanceof Structures.LoopAtScreen
35713
35718
  || type instanceof Structures.Do) {
35714
- const loopName = this.buildName(n.getFirstStatement());
35719
+ const loopName = StatementFlow.buildName(n.getFirstStatement());
35715
35720
  const sub = this.traverseBody(this.findBody(n), Object.assign(Object.assign({}, context), { loopStart: loopName, loopEnd: graph.getEnd() }));
35716
35721
  graph.addEdge(current, loopName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35717
35722
  graph.addGraph(loopName, sub, flow_graph_1.FLOW_EDGE_TYPE.true);
@@ -35724,7 +35729,7 @@ class StatementFlow {
35724
35729
  || type instanceof Structures.Types) {
35725
35730
  // these doesnt affect control flow, so just take the first statement
35726
35731
  const statement = n.getFirstStatement();
35727
- const name = this.buildName(statement);
35732
+ const name = StatementFlow.buildName(statement);
35728
35733
  graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35729
35734
  graph.addEdge(name, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35730
35735
  }
@@ -35732,7 +35737,7 @@ class StatementFlow {
35732
35737
  || type instanceof Structures.AtLast
35733
35738
  || type instanceof Structures.At
35734
35739
  || type instanceof Structures.OnChange) {
35735
- const name = this.buildName(n.getFirstStatement());
35740
+ const name = StatementFlow.buildName(n.getFirstStatement());
35736
35741
  const body = this.traverseBody(this.findBody(n), context);
35737
35742
  graph.addEdge(current, name, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35738
35743
  graph.addGraph(name, body, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -35740,13 +35745,13 @@ class StatementFlow {
35740
35745
  graph.addEdge(current, graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35741
35746
  }
35742
35747
  else if (type instanceof Structures.Try) {
35743
- const tryName = this.buildName(n.getFirstStatement());
35748
+ const tryName = StatementFlow.buildName(n.getFirstStatement());
35744
35749
  const body = this.traverseBody(this.findBody(n), context);
35745
35750
  graph.addEdge(current, tryName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35746
35751
  graph.addGraph(tryName, body, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35747
35752
  graph.addEdge(body.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35748
35753
  for (const c of n.findDirectStructures(Structures.Catch)) {
35749
- const catchName = this.buildName(c.getFirstStatement());
35754
+ const catchName = StatementFlow.buildName(c.getFirstStatement());
35750
35755
  const catchBody = this.traverseBody(this.findBody(c), context);
35751
35756
  // TODO: this does not take exceptions into account
35752
35757
  graph.addEdge(body.getEnd(), catchName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -35757,14 +35762,14 @@ class StatementFlow {
35757
35762
  }
35758
35763
  else if (type instanceof Structures.CatchSystemExceptions) {
35759
35764
  // TODO: this is not completely correct
35760
- const catchName = this.buildName(n.getFirstStatement());
35765
+ const catchName = StatementFlow.buildName(n.getFirstStatement());
35761
35766
  const body = this.traverseBody(this.findBody(n), context);
35762
35767
  graph.addEdge(current, catchName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35763
35768
  graph.addGraph(catchName, body, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35764
35769
  graph.addEdge(body.getEnd(), graph.getEnd(), flow_graph_1.FLOW_EDGE_TYPE.undefined);
35765
35770
  }
35766
35771
  else if (type instanceof Structures.Case) {
35767
- const caseName = this.buildName(n.getFirstStatement());
35772
+ const caseName = StatementFlow.buildName(n.getFirstStatement());
35768
35773
  graph.addEdge(current, caseName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35769
35774
  let othersFound = false;
35770
35775
  for (const w of n.findDirectStructures(Structures.When)) {
@@ -35775,7 +35780,7 @@ class StatementFlow {
35775
35780
  if (first.get() instanceof Statements.WhenOthers) {
35776
35781
  othersFound = true;
35777
35782
  }
35778
- const firstName = this.buildName(first);
35783
+ const firstName = StatementFlow.buildName(first);
35779
35784
  const sub = this.traverseBody(this.findBody(w), context);
35780
35785
  graph.addEdge(caseName, firstName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35781
35786
  graph.addGraph(firstName, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -35786,7 +35791,7 @@ class StatementFlow {
35786
35791
  }
35787
35792
  }
35788
35793
  else if (type instanceof Structures.CaseType) {
35789
- const caseName = this.buildName(n.getFirstStatement());
35794
+ const caseName = StatementFlow.buildName(n.getFirstStatement());
35790
35795
  graph.addEdge(current, caseName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35791
35796
  let othersFound = false;
35792
35797
  for (const w of n.findDirectStructures(Structures.WhenType)) {
@@ -35797,7 +35802,7 @@ class StatementFlow {
35797
35802
  if (first.get() instanceof Statements.WhenOthers) {
35798
35803
  othersFound = true;
35799
35804
  }
35800
- const firstName = this.buildName(first);
35805
+ const firstName = StatementFlow.buildName(first);
35801
35806
  const sub = this.traverseBody(this.findBody(w), context);
35802
35807
  graph.addEdge(caseName, firstName, flow_graph_1.FLOW_EDGE_TYPE.undefined);
35803
35808
  graph.addGraph(firstName, sub, flow_graph_1.FLOW_EDGE_TYPE.undefined);
@@ -53212,7 +53217,7 @@ class Registry {
53212
53217
  }
53213
53218
  static abaplintVersion() {
53214
53219
  // magic, see build script "version.sh"
53215
- return "2.113.63";
53220
+ return "2.113.65";
53216
53221
  }
53217
53222
  getDDICReferences() {
53218
53223
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/cli",
3
- "version": "2.113.63",
3
+ "version": "2.113.65",
4
4
  "description": "abaplint - Command Line Interface",
5
5
  "funding": "https://github.com/sponsors/larshp",
6
6
  "bin": {
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "homepage": "https://abaplint.org",
40
40
  "devDependencies": {
41
- "@abaplint/core": "^2.113.63",
41
+ "@abaplint/core": "^2.113.65",
42
42
  "@types/chai": "^4.3.20",
43
43
  "@types/glob": "^8.1.0",
44
44
  "@types/minimist": "^1.2.5",