@abaplint/core 2.113.54 → 2.113.56

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.
@@ -5,7 +5,7 @@ const combi_1 = require("../combi");
5
5
  const tokens_1 = require("../../1_lexer/tokens");
6
6
  class IncludeName extends combi_1.Expression {
7
7
  getRunnable() {
8
- return (0, combi_1.seq)((0, combi_1.regex)(/^<?(\/\w+\/)?[\w%]+(~\w+)?>?$/), (0, combi_1.optPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.regex)(/^\w+$/))));
8
+ return (0, combi_1.seq)((0, combi_1.regex)(/^<?(\/\w+\/)?[\w%#]+(~\w+)?>?$/), (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), (0, combi_1.optPrio)((0, combi_1.regex)(/^\w+$/)))));
9
9
  }
10
10
  }
11
11
  exports.IncludeName = IncludeName;
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MessageClass = void 0;
4
+ const tokens_1 = require("../../1_lexer/tokens");
4
5
  const combi_1 = require("../combi");
5
6
  class MessageClass extends combi_1.Expression {
6
7
  getRunnable() {
7
8
  // "&1" can be used for almost anything(field names, method names etc.) in macros
8
- return (0, combi_1.regex)(/^>?[\w\/]+#?@?\/?!?&?>?\$?$/);
9
+ return (0, combi_1.seq)((0, combi_1.regex)(/^>?[\w\/]+#?@?\/?!?&?>?\$?\??$/), (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)));
9
10
  }
10
11
  }
11
12
  exports.MessageClass = MessageClass;
@@ -5,10 +5,10 @@ const combi_1 = require("../combi");
5
5
  const _1 = require(".");
6
6
  class RaiseWith extends combi_1.Expression {
7
7
  getRunnable() {
8
- const wit = (0, combi_1.seq)("WITH", _1.SimpleSource1, (0, combi_1.opt)(_1.SimpleSource1), (0, combi_1.opt)(_1.SimpleSource1), (0, combi_1.opt)(_1.SimpleSource1));
8
+ const wit = (0, combi_1.seq)(_1.SimpleSource1, (0, combi_1.opt)(_1.SimpleSource1), (0, combi_1.opt)(_1.SimpleSource1), (0, combi_1.opt)(_1.SimpleSource1));
9
9
  // todo: I guess this is from version something?
10
- const witComplex = (0, combi_1.seq)("WITH", _1.Source, (0, combi_1.opt)(_1.Source), (0, combi_1.opt)(_1.Source), (0, combi_1.opt)(_1.Source));
11
- return (0, combi_1.alt)(wit, witComplex);
10
+ const witComplex = (0, combi_1.seq)(_1.Source, (0, combi_1.opt)(_1.Source), (0, combi_1.opt)(_1.Source), (0, combi_1.opt)(_1.Source));
11
+ return (0, combi_1.seq)("WITH", (0, combi_1.altPrio)(witComplex, wit));
12
12
  }
13
13
  }
14
14
  exports.RaiseWith = RaiseWith;
@@ -8,7 +8,7 @@ const dynamic_1 = require("./dynamic");
8
8
  const sql_arithmetics_1 = require("./sql_arithmetics");
9
9
  class SQLAggregation extends combi_1.Expression {
10
10
  getRunnable() {
11
- const f = (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), (0, combi_1.altPrio)(sql_arithmetics_1.SQLArithmetics, dynamic_1.Dynamic, _1.SQLFunction, _1.SQLCase));
11
+ const f = (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), (0, combi_1.altPrio)(_1.SQLCase, sql_arithmetics_1.SQLArithmetics, dynamic_1.Dynamic, _1.SQLFunction));
12
12
  const fparen = (0, combi_1.seq)("(", _1.Field, ")");
13
13
  const count = (0, combi_1.seq)("COUNT", (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW)), (0, combi_1.optPrio)("DISTINCT"), (0, combi_1.altPrio)("*", _1.Field, fparen), ")");
14
14
  const max = (0, combi_1.seq)("MAX", (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.ParenLeftW)), f, ")");
@@ -13,8 +13,9 @@ class SQLCase extends combi_1.Expression {
13
13
  getRunnable() {
14
14
  const field = (0, combi_1.altPrio)(_1.SQLAggregation, SQLCase, _1.SQLFunction, _1.SQLPath, sql_field_name_1.SQLFieldName, constant_1.Constant);
15
15
  const sub = (0, combi_1.seq)((0, combi_1.altPrio)("+", "-", "*", "/", "&&"), (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenLeftW)), field, (0, combi_1.optPrio)((0, combi_1.tok)(tokens_1.WParenRightW)));
16
- const sourc = (0, combi_1.altPrio)(SQLCase, _1.SQLAggregation, _1.SQLFunction, sql_source_1.SQLSource);
17
- const when = (0, combi_1.seq)("WHEN", (0, combi_1.altPrio)(sql_cond_1.SQLCond, constant_1.Constant), "THEN", sourc, (0, combi_1.starPrio)(sub));
16
+ const sourc = (0, combi_1.altPrio)(SQLCase, _1.SQLAggregation, _1.SQLFunction, sql_source_1.SQLSource, constant_1.Constant);
17
+ const val = (0, combi_1.altPrio)(sql_cond_1.SQLCond, constant_1.Constant, (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WAt), _1.SimpleSource3));
18
+ const when = (0, combi_1.seq)("WHEN", val, "THEN", sourc, (0, combi_1.starPrio)(sub));
18
19
  const els = (0, combi_1.seq)("ELSE", sourc);
19
20
  return (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.seq)("CASE", (0, combi_1.opt)(sql_field_name_1.SQLFieldName), (0, combi_1.plusPrio)(when), (0, combi_1.optPrio)(els), "END"));
20
21
  }
@@ -14,13 +14,14 @@ class Describe {
14
14
  const field = (0, combi_1.seq)("FIELD", expressions_1.Source, (0, combi_1.per)((0, combi_1.seq)("TYPE", expressions_1.Target), (0, combi_1.seq)("COMPONENTS", expressions_1.Target), (0, combi_1.seq)("LENGTH", expressions_1.Target, (0, combi_1.opt)(mode)), (0, combi_1.seq)("DECIMALS", expressions_1.Target), (0, combi_1.seq)("HELP-ID", expressions_1.Target), (0, combi_1.seq)("OUTPUT-LENGTH", expressions_1.Target), (0, combi_1.seq)("EDIT MASK", expressions_1.Target), (0, combi_1.seq)("INTO", expressions_1.Target)));
15
15
  const distance = (0, combi_1.seq)("DISTANCE BETWEEN", expressions_1.Source, "AND", expressions_1.Source, "INTO", expressions_1.Target, mode);
16
16
  const lines = (0, combi_1.seq)("NUMBER OF LINES", expressions_1.Target);
17
+ const pages = (0, combi_1.seq)("NUMBER OF PAGES", expressions_1.Target);
17
18
  const line = (0, combi_1.seq)("LINE", expressions_1.Source);
18
19
  const page = (0, combi_1.seq)("PAGE", expressions_1.Source);
19
20
  const index = (0, combi_1.seq)("INDEX", expressions_1.Source);
20
21
  const top = (0, combi_1.seq)("TOP-LINES", expressions_1.Target);
21
22
  const lineSize = (0, combi_1.seq)("LINE-SIZE", expressions_1.Target);
22
23
  const first = (0, combi_1.seq)("FIRST-LINE", expressions_1.Target);
23
- const list = (0, combi_1.seq)("LIST", (0, combi_1.per)(lines, index, line, page, top, first, lineSize));
24
+ const list = (0, combi_1.seq)("LIST", (0, combi_1.per)(lines, pages, index, line, page, top, first, lineSize));
24
25
  const ret = (0, combi_1.seq)("DESCRIBE", (0, combi_1.altPrio)(table, field, distance, list));
25
26
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
26
27
  }
@@ -8,7 +8,7 @@ class FunctionPool {
8
8
  const message = (0, combi_1.seq)("MESSAGE-ID", expressions_1.MessageClass);
9
9
  const line = (0, combi_1.seq)("LINE-SIZE", expressions_1.Integer);
10
10
  const no = (0, combi_1.str)("NO STANDARD PAGE HEADING");
11
- return (0, combi_1.seq)("FUNCTION-POOL", expressions_1.Field, (0, combi_1.opt)((0, combi_1.per)(message, line, no)));
11
+ return (0, combi_1.seq)("FUNCTION-POOL", expressions_1.IncludeName, (0, combi_1.opt)((0, combi_1.per)(message, line, no)));
12
12
  }
13
13
  }
14
14
  exports.FunctionPool = FunctionPool;
@@ -6,7 +6,7 @@ const expressions_1 = require("../expressions");
6
6
  const version_1 = require("../../../version");
7
7
  class ModifyLine {
8
8
  getMatcher() {
9
- const form = (0, combi_1.seq)((0, combi_1.alt)("INVERSE", "INPUT"), "=", expressions_1.Source);
9
+ const form = (0, combi_1.seq)((0, combi_1.alt)("INVERSE", "INPUT", "COLOR"), "=", expressions_1.Source);
10
10
  const from = (0, combi_1.seq)("FROM", expressions_1.Source);
11
11
  const value = (0, combi_1.seq)("FIELD VALUE", (0, combi_1.plus)((0, combi_1.seq)(expressions_1.Source, (0, combi_1.optPrio)(from))));
12
12
  const format = (0, combi_1.seq)("FIELD FORMAT", expressions_1.Source, (0, combi_1.opt)(form));
@@ -14,7 +14,7 @@ class ModifyLine {
14
14
  const index = (0, combi_1.seq)("INDEX", expressions_1.Source);
15
15
  const page = (0, combi_1.seq)("OF PAGE", expressions_1.Source);
16
16
  const ocp = (0, combi_1.str)("OF CURRENT PAGE");
17
- const lineFormat = (0, combi_1.seq)("LINE FORMAT", (0, combi_1.alt)("INPUT OFF", "INVERSE", "RESET", "INTENSIFIED"));
17
+ const lineFormat = (0, combi_1.seq)("LINE FORMAT", (0, combi_1.per)("INPUT OFF", "INVERSE", "RESET", "INTENSIFIED", "COLOR COL_NORMAL"));
18
18
  const onOff = (0, combi_1.alt)("ON", "OFF");
19
19
  const intensified = (0, combi_1.seq)("INTENSIFIED", onOff);
20
20
  const options = (0, combi_1.per)(index, value, format, page, lineFormat, lineValue, ocp, intensified, expressions_1.Color);
@@ -6,7 +6,7 @@ const expressions_1 = require("../expressions");
6
6
  const version_1 = require("../../../version");
7
7
  class Program {
8
8
  getMatcher() {
9
- const message = (0, combi_1.seq)("MESSAGE-ID", expressions_1.Source);
9
+ const message = (0, combi_1.seq)("MESSAGE-ID", expressions_1.MessageClass);
10
10
  const size = (0, combi_1.seq)("LINE-SIZE", expressions_1.Source);
11
11
  const heading = (0, combi_1.str)("NO STANDARD PAGE HEADING");
12
12
  const line = (0, combi_1.seq)("LINE-COUNT", expressions_1.Source);
@@ -12,7 +12,7 @@ class Submit {
12
12
  const between = (0, combi_1.seq)("BETWEEN", expressions_1.Source, "AND", expressions_1.Source);
13
13
  const selectionTable = (0, combi_1.seq)("WITH SELECTION-TABLE", expressions_1.Source);
14
14
  const awith = (0, combi_1.seq)("WITH", expressions_1.FieldSub, (0, combi_1.alt)(compare, between), (0, combi_1.optPrio)(sign));
15
- const prog = (0, combi_1.alt)(expressions_1.NamespaceSimpleName, expressions_1.Dynamic);
15
+ const prog = (0, combi_1.altPrio)(expressions_1.IncludeName, expressions_1.Dynamic);
16
16
  const job = (0, combi_1.seq)("VIA JOB", expressions_1.Source, "NUMBER", expressions_1.Source);
17
17
  const exporting = (0, combi_1.str)("EXPORTING LIST TO MEMORY");
18
18
  const spool = (0, combi_1.seq)("SPOOL PARAMETERS", expressions_1.Source);
@@ -5,7 +5,7 @@ const Expressions = require("../../2_statements/expressions");
5
5
  const source_1 = require("./source");
6
6
  class RaiseWith {
7
7
  runSyntax(node, input) {
8
- for (const f of node.findDirectExpressions(Expressions.SimpleSource1)) {
8
+ for (const f of node.findAllExpressionsMulti([Expressions.SimpleSource1, Expressions.Source])) {
9
9
  new source_1.Source().runSyntax(f, input);
10
10
  }
11
11
  }
@@ -99,9 +99,10 @@ class Table extends _abstract_object_1.AbstractObject {
99
99
  references.push({ object: lookup.object });
100
100
  }
101
101
  }
102
- else if (field.FIELDNAME === ".INCLUDE" || field.FIELDNAME === ".INCLU--AP") { // incude or append structure
102
+ else if (field.FIELDNAME === ".INCLUDE"
103
+ || field.FIELDNAME.startsWith(".INCLU-")) {
103
104
  if (field.PRECFIELD === undefined) {
104
- return new Types.UnknownType("Table, parser error, PRECFIELD undefined");
105
+ return new Types.UnknownType("Table, parser error, PRECFIELD undefined, " + this.getName());
105
106
  }
106
107
  const lookup = ddic.lookupTableOrView(field.PRECFIELD);
107
108
  let found = lookup.type;
@@ -133,26 +134,25 @@ class Table extends _abstract_object_1.AbstractObject {
133
134
  else {
134
135
  components.push({ name: field.FIELDNAME, type: found });
135
136
  }
136
- }
137
- else if (comptype === "S" && field.FIELDNAME.startsWith(".INCLU-")) {
137
+ /*
138
+ } else if (comptype === "S" && field.FIELDNAME.startsWith(".INCLU-")) {
138
139
  const lookup = ddic.lookupTableOrView(field.PRECFIELD);
139
140
  if (lookup.object) {
140
- references.push({ object: lookup.object });
141
+ references.push({object: lookup.object});
141
142
  }
142
143
  const found = lookup.type;
143
144
  if (found instanceof Types.VoidType) {
144
- // set the full structure to void
145
- return found;
146
- }
147
- else if (found instanceof Types.StructureType) {
148
- const suffix = field.FIELDNAME.split("-")[1];
149
- for (const c of found.getComponents()) {
150
- components.push({ name: c.name + suffix, type: c.type });
151
- }
152
- }
153
- else if (found instanceof Types.UnknownType) {
154
- return found;
145
+ // set the full structure to void
146
+ return found;
147
+ } else if (found instanceof Types.StructureType) {
148
+ const suffix = field.FIELDNAME.split("-")[1];
149
+ for (const c of found.getComponents()) {
150
+ components.push({name: c.name + suffix, type: c.type});
151
+ }
152
+ } else if (found instanceof Types.UnknownType) {
153
+ return found;
155
154
  }
155
+ */
156
156
  }
157
157
  else if (comptype === "S") {
158
158
  const lookup = ddic.lookupTableOrView(field.ROLLNAME);
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.54";
70
+ return "2.113.56";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -1187,7 +1187,7 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
1187
1187
  }
1188
1188
  startToken = node.getFirstToken();
1189
1189
  }
1190
- const withs = ((_f = node.findDirectExpression(Expressions.RaiseWith)) === null || _f === void 0 ? void 0 : _f.findDirectExpressions(Expressions.SimpleSource1)) || [];
1190
+ const withs = ((_f = node.findDirectExpression(Expressions.RaiseWith)) === null || _f === void 0 ? void 0 : _f.findDirectExpressionsMulti([Expressions.SimpleSource1, Expressions.Source])) || [];
1191
1191
  const className = ((_g = node.findDirectExpression(Expressions.ClassName)) === null || _g === void 0 ? void 0 : _g.concatTokens()) || "ERROR";
1192
1192
  const uniqueName1 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
1193
1193
  const uniqueName2 = this.uniqueName(node.getFirstToken().getStart(), lowFile.getFilename(), highSyntax);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.54",
3
+ "version": "2.113.56",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",