@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.
- package/build/src/abap/2_statements/statements/include.js +1 -2
- package/build/src/abap/5_syntax/statements/class_implementation.js +4 -0
- package/build/src/abap/types/method_parameters.js +13 -2
- package/build/src/cds/expressions/cds_annotation_object.js +2 -2
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
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
|
-
|
|
151
|
+
let rapName = node.findExpressionAfterToken("IMPORTING");
|
|
151
152
|
if (rapName) {
|
|
152
|
-
|
|
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,
|
|
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
|
}
|
package/build/src/registry.js
CHANGED