@abaplint/core 2.91.18 → 2.91.21
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.
|
@@ -193,7 +193,7 @@ class BasicTypes {
|
|
|
193
193
|
}
|
|
194
194
|
return undefined;
|
|
195
195
|
}
|
|
196
|
-
simpleType(node) {
|
|
196
|
+
simpleType(node, noQualifiedName) {
|
|
197
197
|
let nameExpr = node.findFirstExpression(Expressions.NamespaceSimpleName);
|
|
198
198
|
if (nameExpr === undefined) {
|
|
199
199
|
nameExpr = node.findFirstExpression(Expressions.DefinitionName);
|
|
@@ -218,6 +218,9 @@ class BasicTypes {
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
+
if (noQualifiedName === true) {
|
|
222
|
+
qualifiedName = undefined;
|
|
223
|
+
}
|
|
221
224
|
const found = this.parseType(node, qualifiedName);
|
|
222
225
|
if (found) {
|
|
223
226
|
return new _typed_identifier_1.TypedIdentifier(name, this.filename, found);
|
|
@@ -7,12 +7,12 @@ const basic_1 = require("../../types/basic");
|
|
|
7
7
|
const Expressions = require("../../2_statements/expressions");
|
|
8
8
|
const type_table_1 = require("../expressions/type_table");
|
|
9
9
|
class Type {
|
|
10
|
-
runSyntax(node, scope, filename) {
|
|
10
|
+
runSyntax(node, scope, filename, noQualifiedName) {
|
|
11
11
|
const tt = node.findFirstExpression(Expressions.TypeTable);
|
|
12
12
|
if (tt) {
|
|
13
13
|
return new type_table_1.TypeTable().runSyntax(node, scope, filename);
|
|
14
14
|
}
|
|
15
|
-
const found = new basic_types_1.BasicTypes(filename, scope).simpleType(node);
|
|
15
|
+
const found = new basic_types_1.BasicTypes(filename, scope).simpleType(node, noQualifiedName);
|
|
16
16
|
if (found) {
|
|
17
17
|
return found;
|
|
18
18
|
}
|
|
@@ -20,7 +20,7 @@ class Types {
|
|
|
20
20
|
const ctyp = c.get();
|
|
21
21
|
if (c instanceof nodes_1.StatementNode) {
|
|
22
22
|
if (ctyp instanceof Statements.Type) {
|
|
23
|
-
const found = new type_1.Type().runSyntax(c, scope, filename);
|
|
23
|
+
const found = new type_1.Type().runSyntax(c, scope, filename, true);
|
|
24
24
|
if (found) {
|
|
25
25
|
components.push({ name: found.getName(), type: found.getType() });
|
|
26
26
|
}
|
package/build/src/registry.js
CHANGED
|
@@ -924,14 +924,15 @@ ${indentation}RAISE EXCEPTION ${uniqueName2}.`;
|
|
|
924
924
|
}
|
|
925
925
|
const enumName = (_b = high.findExpressionAfterToken("ENUM")) === null || _b === void 0 ? void 0 : _b.concatTokens();
|
|
926
926
|
const structureName = (_c = high.findExpressionAfterToken("STRUCTURE")) === null || _c === void 0 ? void 0 : _c.concatTokens();
|
|
927
|
-
|
|
927
|
+
// all ENUMS are char like?
|
|
928
|
+
let code = `TYPES ${enumName} TYPE string.
|
|
928
929
|
CONSTANTS: BEGIN OF ${structureName},\n`;
|
|
929
930
|
let count = 1;
|
|
930
931
|
for (const e of enumStructure.findDirectStatements(Statements.TypeEnum).concat(enumStructure.findDirectStatements(Statements.Type))) {
|
|
931
932
|
const name = (_d = e.findFirstExpression(Expressions.NamespaceSimpleName)) === null || _d === void 0 ? void 0 : _d.concatTokens();
|
|
932
933
|
let value = (_e = e.findFirstExpression(Expressions.Value)) === null || _e === void 0 ? void 0 : _e.concatTokens();
|
|
933
934
|
if (value === undefined) {
|
|
934
|
-
value = "VALUE " + count
|
|
935
|
+
value = "VALUE '" + count++ + "'";
|
|
935
936
|
}
|
|
936
937
|
code += ` ${name} TYPE ${enumName} ${value},\n`;
|
|
937
938
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.91.
|
|
3
|
+
"version": "2.91.21",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://abaplint.org",
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@microsoft/api-extractor": "^7.28.
|
|
48
|
+
"@microsoft/api-extractor": "^7.28.7",
|
|
49
49
|
"@types/chai": "^4.3.1",
|
|
50
50
|
"@types/mocha": "^9.1.1",
|
|
51
|
-
"@types/node": "^18.6.
|
|
51
|
+
"@types/node": "^18.6.3",
|
|
52
52
|
"chai": "^4.3.6",
|
|
53
|
-
"eslint": "^8.
|
|
53
|
+
"eslint": "^8.21.0",
|
|
54
54
|
"mocha": "^10.0.0",
|
|
55
55
|
"c8": "^7.12.0",
|
|
56
56
|
"source-map-support": "^0.5.21",
|