@abaplint/core 2.113.228 → 2.113.230

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.
@@ -6,7 +6,7 @@ const tokens_1 = require("../../1_lexer/tokens");
6
6
  class FormName extends combi_1.Expression {
7
7
  getRunnable() {
8
8
  // todo, does not handle namespaces properly
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
+ 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)));
10
10
  }
11
11
  }
12
12
  exports.FormName = FormName;
@@ -11,8 +11,7 @@ class Sort {
11
11
  const fields = (0, combi_1.plus)((0, combi_1.seq)(sel, (0, combi_1.optPrio)(text), (0, combi_1.optPrio)(order), (0, combi_1.optPrio)(text)));
12
12
  const by = (0, combi_1.seq)("BY", fields);
13
13
  const normal = (0, combi_1.seq)(expressions_1.Target, (0, combi_1.opt)((0, combi_1.per)(order, by, "STABLE", text)));
14
- const target = (0, combi_1.altPrio)(text, normal);
15
- return (0, combi_1.seq)("SORT", target);
14
+ return (0, combi_1.seq)("SORT", normal);
16
15
  }
17
16
  }
18
17
  exports.Sort = Sort;
@@ -7,10 +7,10 @@ const version_1 = require("../../../version");
7
7
  class SortDataset {
8
8
  getMatcher() {
9
9
  const order = (0, combi_1.alt)("ASCENDING", "DESCENDING");
10
- const sel = (0, combi_1.alt)(expressions_1.FieldSub, expressions_1.SourceFieldSymbol, expressions_1.Dynamic);
10
+ const sel = (0, combi_1.alt)(expressions_1.ComponentChain, expressions_1.SourceFieldSymbol, expressions_1.Dynamic);
11
11
  const fields = (0, combi_1.plus)((0, combi_1.seq)(sel, (0, combi_1.optPrio)(order)));
12
12
  const by = (0, combi_1.seq)("BY", fields);
13
- const ret = (0, combi_1.seq)("SORT", (0, combi_1.opt)(by));
13
+ const ret = (0, combi_1.seq)("SORT", (0, combi_1.opt)("AS TEXT"), (0, combi_1.opt)(by));
14
14
  return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
15
15
  }
16
16
  }
@@ -6,9 +6,10 @@ const _combi_1 = require("./_combi");
6
6
  const chain_1 = require("./chain");
7
7
  const loop_1 = require("./loop");
8
8
  const dynpro_loop_1 = require("./dynpro_loop");
9
+ const loop_extract_1 = require("./loop_extract");
9
10
  class ProcessAfterInput {
10
11
  getMatcher() {
11
- const pai = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(chain_1.Chain), (0, _combi_1.sub)(dynpro_loop_1.DynproLoop), (0, _combi_1.sub)(loop_1.Loop)));
12
+ const pai = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(chain_1.Chain), (0, _combi_1.sub)(dynpro_loop_1.DynproLoop), (0, _combi_1.sub)(loop_extract_1.LoopExtract), (0, _combi_1.sub)(loop_1.Loop)));
12
13
  return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessAfterInput), pai);
13
14
  }
14
15
  }
@@ -4,9 +4,10 @@ exports.ProcessBeforeOutput = void 0;
4
4
  const Statements = require("../../2_statements/statements");
5
5
  const _combi_1 = require("./_combi");
6
6
  const dynpro_loop_1 = require("./dynpro_loop");
7
+ const loop_extract_1 = require("./loop_extract");
7
8
  class ProcessBeforeOutput {
8
9
  getMatcher() {
9
- const pbo = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(dynpro_loop_1.DynproLoop)));
10
+ const pbo = (0, _combi_1.star)((0, _combi_1.alt)((0, _combi_1.sta)(Statements.Module), (0, _combi_1.sta)(Statements.Field), (0, _combi_1.sta)(Statements.CallSubscreen), (0, _combi_1.sub)(loop_extract_1.LoopExtract), (0, _combi_1.sub)(dynpro_loop_1.DynproLoop)));
10
11
  return (0, _combi_1.seq)((0, _combi_1.sta)(Statements.ProcessBeforeOutput), pbo);
11
12
  }
12
13
  }
@@ -108,6 +108,9 @@ class BasicTypes {
108
108
  if (chain === undefined) {
109
109
  chain = node.findFirstExpression(Expressions.SimpleFieldChain);
110
110
  }
111
+ if (chain === undefined) {
112
+ chain = node.findFirstExpression(Expressions.SimpleFieldChain2);
113
+ }
111
114
  if (chain === undefined) {
112
115
  throw new Error("resolveLikeName, chain undefined");
113
116
  }
@@ -6,16 +6,24 @@ const basic_1 = require("../../types/basic");
6
6
  const expressions_1 = require("../../2_statements/expressions");
7
7
  const basic_types_1 = require("../basic_types");
8
8
  const assert_error_1 = require("../assert_error");
9
+ const tokens_1 = require("../../1_lexer/tokens");
9
10
  class FormParam {
10
11
  static runSyntax(node, input) {
11
- var _a, _b, _c;
12
- const nameToken = (_a = node.findFirstExpression(expressions_1.FormParamName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
12
+ var _a, _b;
13
+ const formParamName = node.findFirstExpression(expressions_1.FormParamName);
14
+ if (formParamName === undefined) {
15
+ throw new assert_error_1.AssertError("FormParam, could not find FormParamName");
16
+ }
17
+ let nameToken = formParamName.getFirstToken();
18
+ if (formParamName.getChildren().length > 1) {
19
+ nameToken = new tokens_1.Identifier(nameToken.getStart(), formParamName.concatTokens());
20
+ }
13
21
  if (node.findDirectTokenByText("STRUCTURE") && nameToken) {
14
22
  // STRUCTURES typing
15
- const typeName = (_b = node.findDirectExpression(expressions_1.SimpleFieldChain)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStr();
23
+ const typeName = (_a = node.findDirectExpression(expressions_1.SimpleFieldChain)) === null || _a === void 0 ? void 0 : _a.getFirstToken().getStr();
16
24
  let type = undefined;
17
25
  if (typeName) {
18
- type = (_c = input.scope.findType(typeName)) === null || _c === void 0 ? void 0 : _c.getType();
26
+ type = (_b = input.scope.findType(typeName)) === null || _b === void 0 ? void 0 : _b.getType();
19
27
  if (type === undefined) {
20
28
  type = input.scope.getDDIC().lookupTableOrView(typeName).type;
21
29
  }
@@ -15,7 +15,7 @@ class Controls {
15
15
  }
16
16
  if (node.findDirectTokenByText("TABLEVIEW") && token) {
17
17
  const cols = new basic_1.StructureType([
18
- { name: "SCREEN", type: new basic_1.CharacterType(1) }, // todo
18
+ { name: "SCREEN", type: basic_1.VoidType.get("TABLEVIEW-SCREEN") }, // todo
19
19
  { name: "INDEX", type: basic_1.IntegerType.get() },
20
20
  { name: "SELECTED", type: new basic_1.CharacterType(1) },
21
21
  { name: "VISLENGTH", type: basic_1.IntegerType.get() },
@@ -14,7 +14,7 @@ class Ranges {
14
14
  if (typeExpression === undefined) {
15
15
  throw new assert_error_1.AssertError("Ranges, unexpected node");
16
16
  }
17
- const found = new basic_types_1.BasicTypes(input).parseType(typeExpression);
17
+ const found = new basic_types_1.BasicTypes(input).resolveLikeName(typeExpression);
18
18
  if (found && nameToken) {
19
19
  const structure = new basic_1.StructureType([
20
20
  { name: "sign", type: new basic_1.CharacterType(1) },
@@ -17,7 +17,7 @@ class Data {
17
17
  static runSyntax(node, input) {
18
18
  var _a;
19
19
  const fouth = (_a = node.getFirstChild()) === null || _a === void 0 ? void 0 : _a.getChildren()[3];
20
- const isCommonPart = fouth instanceof nodes_1.TokenNode && fouth.concatTokens() === "COMMON";
20
+ const isCommonPart = fouth instanceof nodes_1.TokenNode && fouth.concatTokens().toUpperCase() === "COMMON";
21
21
  if (isCommonPart) {
22
22
  this.runCommonPartSyntax(node, input);
23
23
  return undefined;
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.228";
70
+ return "2.113.230";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.228",
3
+ "version": "2.113.230",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",