@abaplint/core 2.93.63 → 2.93.64

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.
@@ -3,11 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Include = void 0;
4
4
  const combi_1 = require("../combi");
5
5
  const expressions_1 = require("../expressions");
6
- const version_1 = require("../../../version");
7
6
  class Include {
8
7
  getMatcher() {
9
8
  const ret = (0, combi_1.seq)("INCLUDE", expressions_1.IncludeName, (0, combi_1.opt)("IF FOUND"));
10
- return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
9
+ return ret;
11
10
  }
12
11
  }
13
12
  exports.Include = Include;
@@ -24,6 +24,10 @@ class ClassImplementation {
24
24
  if (sup) {
25
25
  scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(new tokens_1.Identifier(new position_1.Position(1, 1), "super"), _builtin_1.BuiltIn.filename, new basic_1.ObjectReferenceType(sup)));
26
26
  }
27
+ else {
28
+ // todo: instead of the void type, do proper typing, ie. only empty constructor method
29
+ scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(new tokens_1.Identifier(new position_1.Position(1, 1), "super"), _builtin_1.BuiltIn.filename, new basic_1.VoidType("noSuper")));
30
+ }
27
31
  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)));
28
32
  helper.addAliasedAttributes(classDefinition); // todo, this is not correct, take care of instance vs static
29
33
  const classAttributes = classDefinition.getAttributes();
@@ -10,6 +10,7 @@ const method_def_returning_1 = require("../5_syntax/expressions/method_def_retur
10
10
  const method_param_1 = require("../5_syntax/expressions/method_param");
11
11
  const _object_oriented_1 = require("../5_syntax/_object_oriented");
12
12
  const _reference_1 = require("../5_syntax/_reference");
13
+ const identifier_1 = require("../1_lexer/tokens/identifier");
13
14
  // todo:
14
15
  // this.exceptions = [];
15
16
  // also consider RAISING vs EXCEPTIONS
@@ -147,9 +148,19 @@ class MethodParameters {
147
148
  }
148
149
  }
149
150
  // RAP parameters, temporary fix
150
- const rapName = node.findExpressionAfterToken("IMPORTING");
151
+ let rapName = node.findExpressionAfterToken("IMPORTING");
151
152
  if (rapName) {
152
- this.importing.push(new _typed_identifier_1.TypedIdentifier(rapName.getFirstToken(), filename, new basic_1.VoidType("RapMethodParameter"), ["importing" /* IdentifierMeta.MethodImporting */]));
153
+ const token = rapName.getFirstToken();
154
+ this.importing.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.VoidType("RapMethodParameter"), ["importing" /* IdentifierMeta.MethodImporting */]));
155
+ if (node.concatTokens().toUpperCase().includes(" FOR VALIDATE ON SAVE")) {
156
+ this.exporting.push(new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(token.getStart(), "failed"), filename, new basic_1.VoidType("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
157
+ this.exporting.push(new _typed_identifier_1.TypedIdentifier(new identifier_1.Identifier(token.getStart(), "reported"), filename, new basic_1.VoidType("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
158
+ }
159
+ }
160
+ rapName = node.findExpressionAfterToken("RESULT");
161
+ if (rapName) {
162
+ const token = rapName.getFirstToken();
163
+ this.importing.push(new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.VoidType("RapMethodParameter"), ["exporting" /* IdentifierMeta.MethodExporting */]));
153
164
  }
154
165
  const exporting = node.findFirstExpression(Expressions.MethodDefExporting);
155
166
  if (exporting) {
@@ -6,9 +6,9 @@ const combi_1 = require("../../abap/2_statements/combi");
6
6
  const cds_annotation_simple_1 = require("./cds_annotation_simple");
7
7
  class CDSAnnotationObject extends combi_1.Expression {
8
8
  getRunnable() {
9
- const value = (0, combi_1.alt)(CDSAnnotationObject, _1.CDSAnnotationArray, cds_annotation_simple_1.CDSAnnotationSimple);
9
+ const value = (0, combi_1.seq)(":", (0, combi_1.alt)(CDSAnnotationObject, _1.CDSAnnotationArray, cds_annotation_simple_1.CDSAnnotationSimple));
10
10
  const namedot = (0, combi_1.seq)(_1.CDSName, (0, combi_1.star)((0, combi_1.seq)(".", _1.CDSName)));
11
- const valueNested = (0, combi_1.seq)("{", namedot, ":", value, (0, combi_1.star)((0, combi_1.seq)(",", namedot, ":", value)), "}");
11
+ const valueNested = (0, combi_1.seq)("{", namedot, (0, combi_1.opt)(value), (0, combi_1.star)((0, combi_1.seq)(",", namedot, (0, combi_1.opt)(value))), "}");
12
12
  return valueNested;
13
13
  }
14
14
  }
@@ -63,7 +63,7 @@ class Registry {
63
63
  }
64
64
  static abaplintVersion() {
65
65
  // magic, see build script "version.sh"
66
- return "2.93.63";
66
+ return "2.93.64";
67
67
  }
68
68
  getDDICReferences() {
69
69
  return this.references;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.93.63",
3
+ "version": "2.93.64",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",