@abaplint/core 2.118.5 → 2.118.7
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/submit.js +3 -1
- package/build/src/abap/5_syntax/_type_utils.js +4 -7
- package/build/src/abap/5_syntax/expressions/method_parameters.js +2 -2
- package/build/src/abap/5_syntax/expressions/select.js +4 -3
- package/build/src/abap/5_syntax/statements/split.js +1 -1
- package/build/src/registry.js +1 -1
- package/build/src/rules/ambiguous_statement.js +12 -1
- package/package.json +2 -2
|
@@ -17,6 +17,8 @@ class Submit {
|
|
|
17
17
|
const exporting = (0, combi_1.str)("EXPORTING LIST TO MEMORY");
|
|
18
18
|
const spool = (0, combi_1.seq)("SPOOL PARAMETERS", expressions_1.Source);
|
|
19
19
|
const archive = (0, combi_1.seq)("ARCHIVE PARAMETERS", expressions_1.Source);
|
|
20
|
+
const archiveMode = (0, combi_1.seq)("ARCHIVE MODE", expressions_1.Source);
|
|
21
|
+
const receiver = (0, combi_1.seq)("RECEIVER", expressions_1.Source);
|
|
20
22
|
const lineSize = (0, combi_1.seq)("LINE-SIZE", expressions_1.Source);
|
|
21
23
|
const lineCount = (0, combi_1.seq)("LINE-COUNT", expressions_1.Source);
|
|
22
24
|
const user = (0, combi_1.seq)("USER", expressions_1.Source);
|
|
@@ -35,7 +37,7 @@ class Submit {
|
|
|
35
37
|
const imm = (0, combi_1.seq)("IMMEDIATELY", expressions_1.Source);
|
|
36
38
|
const dest = (0, combi_1.seq)("DESTINATION", expressions_1.Source);
|
|
37
39
|
const language = (0, combi_1.seq)("LANGUAGE", expressions_1.Source);
|
|
38
|
-
const perm = (0, combi_1.per)((0, combi_1.plus)(awith), selectionTable, (0, combi_1.plus)(awith), spool, lineSize, lineCount, archive, user, sset, ssetp, keep, cover, imm, layout, dest, coverText, listName, language, free, newList, uss, copies, datasetExpiration, "TO SAP-SPOOL", "WITHOUT SPOOL DYNPRO", "VIA SELECTION-SCREEN", exporting, expressions_1.AndReturn, job);
|
|
40
|
+
const perm = (0, combi_1.per)((0, combi_1.plus)(awith), selectionTable, (0, combi_1.plus)(awith), (0, combi_1.plus)(awith), spool, lineSize, lineCount, archive, archiveMode, receiver, user, sset, ssetp, keep, cover, imm, layout, dest, coverText, listName, language, free, newList, uss, copies, datasetExpiration, "TO SAP-SPOOL", "WITHOUT SPOOL DYNPRO", "VIA SELECTION-SCREEN", exporting, expressions_1.AndReturn, job);
|
|
39
41
|
const ret = (0, combi_1.seq)("SUBMIT", prog, (0, combi_1.opt)(perm));
|
|
40
42
|
return (0, combi_1.verNot)(version_1.Version.Cloud, ret);
|
|
41
43
|
}
|
|
@@ -439,6 +439,10 @@ class TypeUtils {
|
|
|
439
439
|
&& targetKeyType !== table_type_1.TableKeyType.user) {
|
|
440
440
|
return false;
|
|
441
441
|
}
|
|
442
|
+
if (sourceKeyType === table_type_1.TableKeyType.empty && targetKeyType !== table_type_1.TableKeyType.empty
|
|
443
|
+
&& !(target.getRowType() instanceof basic_1.AnyType)) {
|
|
444
|
+
return false;
|
|
445
|
+
}
|
|
442
446
|
return this.isAssignableStrict(source.getRowType(), target.getRowType());
|
|
443
447
|
}
|
|
444
448
|
else if (target instanceof basic_1.UnknownType
|
|
@@ -496,13 +500,6 @@ class TypeUtils {
|
|
|
496
500
|
return false;
|
|
497
501
|
}
|
|
498
502
|
}
|
|
499
|
-
const sourceKeyType = source.getOptions().keyType;
|
|
500
|
-
const targetKeyType = target.getOptions().keyType;
|
|
501
|
-
if (sourceKeyType !== targetKeyType
|
|
502
|
-
&& sourceKeyType !== table_type_1.TableKeyType.user
|
|
503
|
-
&& targetKeyType !== table_type_1.TableKeyType.user) {
|
|
504
|
-
return false;
|
|
505
|
-
}
|
|
506
503
|
return true;
|
|
507
504
|
}
|
|
508
505
|
return false;
|
|
@@ -111,7 +111,7 @@ class MethodParameters {
|
|
|
111
111
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
112
112
|
return;
|
|
113
113
|
}
|
|
114
|
-
else if (item.targetType && new _type_utils_1.TypeUtils(input.scope).
|
|
114
|
+
else if (item.targetType && new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(parameterType, item.targetType) === false) {
|
|
115
115
|
const message = "Method parameter type not compatible, " + item.name;
|
|
116
116
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
117
117
|
return;
|
|
@@ -139,7 +139,7 @@ class MethodParameters {
|
|
|
139
139
|
}
|
|
140
140
|
parameterType = parameter.getType();
|
|
141
141
|
}
|
|
142
|
-
if (item.targetType && new _type_utils_1.TypeUtils(input.scope).
|
|
142
|
+
if (item.targetType && new _type_utils_1.TypeUtils(input.scope).isAssignableStrict(parameterType, item.targetType) === false) {
|
|
143
143
|
const message = "Method parameter type not compatible, " + item.name;
|
|
144
144
|
input.issues.push((0, _syntax_input_1.syntaxIssue)(input, node.getFirstToken(), message));
|
|
145
145
|
return;
|
|
@@ -322,16 +322,17 @@ class Select {
|
|
|
322
322
|
if (dbSources.length !== 1) {
|
|
323
323
|
return basic_1.VoidType.get("SELECT_todo3");
|
|
324
324
|
}
|
|
325
|
+
const tableOptions = { withHeader: false, keyType: basic_1.TableKeyType.empty };
|
|
325
326
|
if (dbSources[0] === undefined) {
|
|
326
327
|
// then its a voided table
|
|
327
|
-
return basic_1.VoidType.get("SELECT_todo4");
|
|
328
|
+
return new basic_1.TableType(basic_1.VoidType.get("SELECT_todo4"), tableOptions, undefined);
|
|
328
329
|
}
|
|
329
330
|
const dbType = dbSources[0].parseType(scope.getRegistry());
|
|
330
331
|
if (!(dbType instanceof basic_1.StructureType)) {
|
|
331
332
|
return basic_1.VoidType.get("SELECT_todo5");
|
|
332
333
|
}
|
|
333
334
|
if (fields.length === 1 && fields[0].code === "*") {
|
|
334
|
-
return new basic_1.TableType(dbType,
|
|
335
|
+
return new basic_1.TableType(dbType, tableOptions, undefined);
|
|
335
336
|
}
|
|
336
337
|
const allFieldsSimple = fields.every(f => isSimple.test(f.code));
|
|
337
338
|
if (allFieldsSimple === true) {
|
|
@@ -343,7 +344,7 @@ class Select {
|
|
|
343
344
|
}
|
|
344
345
|
components.push({ name: field.code, type });
|
|
345
346
|
}
|
|
346
|
-
return new basic_1.TableType(new basic_1.StructureType(components),
|
|
347
|
+
return new basic_1.TableType(new basic_1.StructureType(components), tableOptions, undefined);
|
|
347
348
|
}
|
|
348
349
|
return basic_1.VoidType.get("SELECT_todo7");
|
|
349
350
|
}
|
|
@@ -11,7 +11,7 @@ const _syntax_input_1 = require("../_syntax_input");
|
|
|
11
11
|
class Split {
|
|
12
12
|
runSyntax(node, input) {
|
|
13
13
|
const intoTable = node.findTokenSequencePosition("INTO", "TABLE") !== undefined;
|
|
14
|
-
const type = intoTable ? new basic_1.TableType(basic_1.StringType.get(), { withHeader: false, keyType: basic_1.TableKeyType.
|
|
14
|
+
const type = intoTable ? new basic_1.TableType(basic_1.StringType.get(), { withHeader: false, keyType: basic_1.TableKeyType.default }) : basic_1.StringType.get();
|
|
15
15
|
for (const target of node.findAllExpressions(Expressions.Target)) {
|
|
16
16
|
const inline = target.findDirectExpression(Expressions.InlineData);
|
|
17
17
|
if (inline) {
|
package/build/src/registry.js
CHANGED
|
@@ -56,11 +56,17 @@ MODIFY TABLE foo FROM bar.`,
|
|
|
56
56
|
match = this.tryMatch(statement, this.reg, Statements.DeleteDatabase);
|
|
57
57
|
}
|
|
58
58
|
else if (statement.get() instanceof Statements.ModifyInternal) {
|
|
59
|
-
match = this.tryMatch(statement, this.reg, Statements.ModifyDatabase);
|
|
59
|
+
match = this.tryMatch(statement, this.reg, Statements.ModifyDatabase) || this.isBareStatement(statement);
|
|
60
60
|
}
|
|
61
61
|
else if (statement.get() instanceof Statements.ModifyDatabase) {
|
|
62
62
|
match = this.tryMatch(statement, this.reg, Statements.ModifyInternal);
|
|
63
63
|
}
|
|
64
|
+
else if (statement.get() instanceof Statements.InsertDatabase) {
|
|
65
|
+
match = this.isBareStatement(statement);
|
|
66
|
+
}
|
|
67
|
+
else if (statement.get() instanceof Statements.UpdateDatabase) {
|
|
68
|
+
match = this.isBareStatement(statement);
|
|
69
|
+
}
|
|
64
70
|
if (match) {
|
|
65
71
|
const issue = issue_1.Issue.atStatement(file, statement, this.getMessage(), this.getMetadata().key, this.conf.severity);
|
|
66
72
|
issues.push(issue);
|
|
@@ -68,6 +74,11 @@ MODIFY TABLE foo FROM bar.`,
|
|
|
68
74
|
}
|
|
69
75
|
return issues;
|
|
70
76
|
}
|
|
77
|
+
isBareStatement(st) {
|
|
78
|
+
const tokens = st.getTokens().slice(0);
|
|
79
|
+
tokens.pop();
|
|
80
|
+
return tokens.length === 2;
|
|
81
|
+
}
|
|
71
82
|
tryMatch(st, reg, type1) {
|
|
72
83
|
const ver = reg.getConfig().getVersion();
|
|
73
84
|
const tokens = st.getTokens().slice(0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.118.
|
|
3
|
+
"version": "2.118.7",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"typescript": "^5.9.3"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"fast-xml-parser": "^5.5.
|
|
66
|
+
"fast-xml-parser": "^5.5.9",
|
|
67
67
|
"json5": "^2.2.3",
|
|
68
68
|
"vscode-languageserver-types": "^3.17.5"
|
|
69
69
|
}
|