@abaplint/core 2.113.49 → 2.113.51

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.
@@ -35,7 +35,7 @@ class ObjectOriented {
35
35
  return ret;
36
36
  }
37
37
  addAliasedAttributes(classDefinition) {
38
- for (const alias of classDefinition.getAliases()) {
38
+ for (const alias of classDefinition.getAliases() || []) {
39
39
  const comp = alias.getComponent();
40
40
  const idef = this.scope.findInterfaceDefinition(comp.split("~")[0]);
41
41
  if (idef) {
@@ -29,7 +29,7 @@ class Select {
29
29
  const fields = this.findFields(node, input);
30
30
  if (fields.length === 0
31
31
  && node.findDirectExpression(Expressions.SQLFieldListLoop) === undefined) {
32
- const message = `fields missing`;
32
+ const message = `SELECT: fields missing`;
33
33
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
34
34
  return;
35
35
  }
@@ -208,7 +208,7 @@ class Select {
208
208
  const ret = [];
209
209
  expr = node.findFirstExpression(Expressions.SQLFieldList);
210
210
  if (expr === undefined) {
211
- expr = node.findDirectExpression(Expressions.SQLFieldListLoop);
211
+ expr = node.findFirstExpression(Expressions.SQLFieldListLoop);
212
212
  }
213
213
  if (((_a = expr === null || expr === void 0 ? void 0 : expr.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.Dynamic) {
214
214
  new dynamic_1.Dynamic().runSyntax(expr.getFirstChild(), input);
@@ -20,8 +20,11 @@ class ClassImplementation {
20
20
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
21
21
  return;
22
22
  }
23
- for (const t of classDefinition.getTypeDefinitions().getAll()) {
24
- input.scope.addType(t.type);
23
+ const types = classDefinition.getTypeDefinitions();
24
+ if (types !== undefined) {
25
+ for (const t of types.getAll()) {
26
+ input.scope.addType(t.type);
27
+ }
25
28
  }
26
29
  const sup = input.scope.findClassDefinition(classDefinition.getSuperClass());
27
30
  if (sup) {
@@ -34,10 +37,12 @@ class ClassImplementation {
34
37
  input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(new tokens_1.Identifier(new position_1.Position(1, 1), "me"), _builtin_1.BuiltIn.filename, new basic_1.ObjectReferenceType(classDefinition)));
35
38
  helper.addAliasedAttributes(classDefinition); // todo, this is not correct, take care of instance vs static
36
39
  const classAttributes = classDefinition.getAttributes();
37
- input.scope.addList(classAttributes.getConstants());
38
- input.scope.addList(classAttributes.getStatic());
39
- for (const i of classAttributes.getInstance()) {
40
- input.scope.addExtraLikeType(i);
40
+ if (classAttributes !== undefined) {
41
+ input.scope.addList(classAttributes.getConstants());
42
+ input.scope.addList(classAttributes.getStatic());
43
+ for (const i of classAttributes.getInstance()) {
44
+ input.scope.addExtraLikeType(i);
45
+ }
41
46
  }
42
47
  helper.fromSuperClassesAndInterfaces(classDefinition);
43
48
  }
@@ -12,7 +12,8 @@ class CDSArithmetics extends combi_1.Expression {
12
12
  const operatorValue = (0, combi_1.seq)(operator, val);
13
13
  const paren = (0, combi_1.seq)("(", val, (0, combi_1.plus)(operatorValue), ")");
14
14
  const noParen = (0, combi_1.seq)(val, (0, combi_1.plus)(operatorValue));
15
- return (0, combi_1.altPrio)(paren, noParen);
15
+ // todo: this is pretty bad, it needs a rewrite
16
+ return (0, combi_1.altPrio)((0, combi_1.seq)(paren, (0, combi_1.plus)(operatorValue)), paren, noParen);
16
17
  }
17
18
  }
18
19
  exports.CDSArithmetics = CDSArithmetics;
@@ -7,7 +7,7 @@ const cds_as_1 = require("./cds_as");
7
7
  const cds_cast_1 = require("./cds_cast");
8
8
  class CDSElement extends combi_1.Expression {
9
9
  getRunnable() {
10
- return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSFunction, _1.CDSArithmetics, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)(_1.CDSName, ": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName), _1.CDSPrefixedName, (0, combi_1.regex)(/^\d+$/)), (0, combi_1.opt)(cds_as_1.CDSAs));
10
+ return (0, combi_1.seq)((0, combi_1.starPrio)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.altPrio)(_1.CDSAggregate, _1.CDSString, _1.CDSArithmetics, _1.CDSFunction, cds_cast_1.CDSCast, _1.CDSCase, (0, combi_1.seq)(_1.CDSName, ": REDIRECTED TO", (0, combi_1.opt)((0, combi_1.alt)("PARENT", "COMPOSITION CHILD")), _1.CDSName), _1.CDSPrefixedName, (0, combi_1.regex)(/^\d+$/)), (0, combi_1.opt)(cds_as_1.CDSAs));
11
11
  }
12
12
  }
13
13
  exports.CDSElement = CDSElement;
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.49";
70
+ return "2.113.51";
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.49",
3
+ "version": "2.113.51",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",