@abaplint/core 2.113.52 → 2.113.53
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/expressions/inline_loop_definition.js +2 -1
- package/build/src/abap/2_statements/expressions/select.js +1 -4
- package/build/src/abap/2_statements/expressions/sql_field_list.js +3 -1
- package/build/src/abap/2_statements/expressions/string_template_formatting.js +1 -1
- package/build/src/abap/2_statements/expressions/target_field_symbol.js +1 -1
- package/build/src/abap/2_statements/statements/method_def.js +1 -1
- package/build/src/abap/5_syntax/_type_utils.js +3 -0
- package/build/src/cds/cds_determine_types.js +3 -3
- package/build/src/objects/data_definition.js +1 -1
- package/build/src/registry.js +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,8 @@ const _1 = require(".");
|
|
|
6
6
|
class InlineLoopDefinition extends combi_1.Expression {
|
|
7
7
|
getRunnable() {
|
|
8
8
|
const index = (0, combi_1.seq)("INDEX INTO", _1.TargetField);
|
|
9
|
-
|
|
9
|
+
const key = (0, combi_1.seq)("USING KEY", _1.SimpleName);
|
|
10
|
+
return (0, combi_1.seq)((0, combi_1.altPrio)(_1.TargetFieldSymbol, _1.TargetField), "IN", (0, combi_1.opt)("GROUP"), _1.Source, (0, combi_1.optPrio)(key), (0, combi_1.optPrio)(index));
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
exports.InlineLoopDefinition = InlineLoopDefinition;
|
|
@@ -6,8 +6,6 @@ const _1 = require(".");
|
|
|
6
6
|
const version_1 = require("../../../version");
|
|
7
7
|
const sql_group_by_1 = require("./sql_group_by");
|
|
8
8
|
const sql_into_structure_1 = require("./sql_into_structure");
|
|
9
|
-
const tokens_1 = require("../../1_lexer/tokens");
|
|
10
|
-
const sql_field_name_1 = require("./sql_field_name");
|
|
11
9
|
const sql_up_to_1 = require("./sql_up_to");
|
|
12
10
|
class Select extends combi_1.Expression {
|
|
13
11
|
getRunnable() {
|
|
@@ -19,8 +17,7 @@ class Select extends combi_1.Expression {
|
|
|
19
17
|
// todo, HINTS cannot be anywhere, need an expression dedicated for strict sql
|
|
20
18
|
const perm = (0, combi_1.per)(_1.SQLFrom, into, _1.SQLForAllEntries, where, _1.SQLOrderBy, sql_up_to_1.SQLUpTo, offset, _1.SQLClient, _1.SQLHaving, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection, _1.SQLHints);
|
|
21
19
|
const permSingle = (0, combi_1.per)(_1.SQLFrom, (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList), where, _1.SQLClient, bypass, sql_group_by_1.SQLGroupBy, fields, _1.DatabaseConnection, _1.SQLHints);
|
|
22
|
-
const
|
|
23
|
-
const fieldList = (0, combi_1.optPrio)((0, combi_1.altPrio)(_1.SQLFieldList, paren));
|
|
20
|
+
const fieldList = (0, combi_1.optPrio)(_1.SQLFieldList);
|
|
24
21
|
const single = (0, combi_1.seq)("SINGLE", (0, combi_1.optPrio)("FOR UPDATE"), fieldList, permSingle);
|
|
25
22
|
const other = (0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), fieldList, perm);
|
|
26
23
|
const ret = (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)(single, other));
|
|
@@ -4,11 +4,13 @@ exports.SQLFieldList = void 0;
|
|
|
4
4
|
const combi_1 = require("../combi");
|
|
5
5
|
const _1 = require(".");
|
|
6
6
|
const version_1 = require("../../../version");
|
|
7
|
+
const tokens_1 = require("../../1_lexer/tokens");
|
|
7
8
|
class SQLFieldList extends combi_1.Expression {
|
|
8
9
|
getRunnable() {
|
|
10
|
+
const paren = (0, combi_1.seq)((0, combi_1.tok)(tokens_1.WParenLeftW), _1.SQLFieldName, (0, combi_1.tok)(tokens_1.WParenRightW));
|
|
9
11
|
const nev = (0, combi_1.ver)(version_1.Version.v740sp05, (0, combi_1.starPrio)((0, combi_1.seq)(",", _1.SQLField)));
|
|
10
12
|
const old = (0, combi_1.starPrio)(_1.SQLField);
|
|
11
|
-
return (0, combi_1.altPrio)("*", _1.Dynamic, (0, combi_1.seq)(_1.SQLField, (0, combi_1.alt)(nev, old)));
|
|
13
|
+
return (0, combi_1.altPrio)("*", _1.Dynamic, (0, combi_1.seq)(_1.SQLField, (0, combi_1.alt)(nev, old)), paren);
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
16
|
exports.SQLFieldList = SQLFieldList;
|
|
@@ -12,7 +12,7 @@ class StringTemplateFormatting extends combi_1.Expression {
|
|
|
12
12
|
const alignOptions = (0, combi_1.altPrio)("LEFT", "RIGHT", "CENTER", _1.Source);
|
|
13
13
|
const dateTimeOptions = (0, combi_1.altPrio)("RAW", "ISO", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
|
|
14
14
|
const timeStampOptions = (0, combi_1.altPrio)("SPACE", "ISO", "USER", "ENVIRONMENT", _1.Source);
|
|
15
|
-
const numberOptions = (0, combi_1.altPrio)("RAW", "USER", "ENVIRONMENT", _1.Source);
|
|
15
|
+
const numberOptions = (0, combi_1.altPrio)("RAW", "USER", "ENVIRONMENT", _1.Source, dynamic_1.Dynamic);
|
|
16
16
|
const signOptions = (0, combi_1.altPrio)("LEFT", "LEFTPLUS", "LEFTSPACE", "RIGHT", "RIGHTPLUS", "RIGHTSPACE", _1.Source);
|
|
17
17
|
const caseOptions = (0, combi_1.altPrio)("RAW", "UPPER", "LOWER", _1.Source, dynamic_1.Dynamic);
|
|
18
18
|
const zeroXSDOptions = (0, combi_1.altPrio)("YES", "NO", _1.Source);
|
|
@@ -5,7 +5,7 @@ const combi_1 = require("../combi");
|
|
|
5
5
|
const _1 = require(".");
|
|
6
6
|
class TargetFieldSymbol extends combi_1.Expression {
|
|
7
7
|
getRunnable() {
|
|
8
|
-
return
|
|
8
|
+
return (0, combi_1.seq)(_1.FieldSymbol, (0, combi_1.optPrio)(_1.TableBody));
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
exports.TargetFieldSymbol = TargetFieldSymbol;
|
|
@@ -22,7 +22,7 @@ class MethodDef {
|
|
|
22
22
|
const behavior = (0, combi_1.altPrio)((0, combi_1.seq)("VALIDATE ON SAVE IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("MODIFY IMPORTING", expressions_1.MethodParamName, modify), (0, combi_1.seq)("READ IMPORTING", expressions_1.MethodParamName, (0, combi_1.altPrio)(forRead, forfunction)), (0, combi_1.seq)("FEATURES IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.NamespaceSimpleName, "FOR", expressions_1.NamespaceSimpleName, result), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR CREATE", expressions_1.TypeName, expressions_1.MethodParamName, "FOR UPDATE", expressions_1.TypeName, expressions_1.MethodParamName, "FOR DELETE", expressions_1.TypeName), (0, combi_1.seq)("BEHAVIOR IMPORTING", expressions_1.MethodParamName, "FOR READ", expressions_1.TypeName, result), (0, combi_1.seq)((0, combi_1.alt)("BEHAVIOR", "LOCK"), "IMPORTING", expressions_1.MethodParamName, "FOR LOCK", expressions_1.TypeName), (0, combi_1.seq)("DETERMINE", (0, combi_1.alt)("ON MODIFY", "ON SAVE"), "IMPORTING", expressions_1.MethodParamName, "FOR", expressions_1.TypeName), (0, combi_1.seq)("GLOBAL AUTHORIZATION IMPORTING REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result), (0, combi_1.seq)("INSTANCE AUTHORIZATION IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result), (0, combi_1.seq)("INSTANCE FEATURES IMPORTING", expressions_1.MethodParamName, "REQUEST", expressions_1.MethodParamName, "FOR", expressions_1.TypeName, result));
|
|
23
23
|
// todo, this is only from version something
|
|
24
24
|
const amdp = (0, combi_1.seq)("AMDP OPTIONS CDS SESSION CLIENT CURRENT", (0, combi_1.optPrio)(expressions_1.MethodDefImporting), (0, combi_1.optPrio)(expressions_1.MethodDefExporting), (0, combi_1.optPrio)(expressions_1.MethodDefRaising));
|
|
25
|
-
const ret = (0, combi_1.seq)((0, combi_1.altPrio)("CLASS-METHODS", "METHODS"), expressions_1.MethodName, (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), expressions_1.EventHandler), parameters, testing, (0, combi_1.seq)("FOR", (0, combi_1.alt)(tableFunction, ddl, behavior)), amdp, "NOT AT END OF MODE", (0, combi_1.optPrio)(expressions_1.Redefinition)));
|
|
25
|
+
const ret = (0, combi_1.seq)((0, combi_1.altPrio)("CLASS-METHODS", "METHODS"), expressions_1.MethodName, (0, combi_1.alt)((0, combi_1.seq)((0, combi_1.optPrio)(expressions_1.Abstract), (0, combi_1.optPrio)(def), expressions_1.EventHandler), parameters, testing, (0, combi_1.seq)("FOR", (0, combi_1.alt)(tableFunction, ddl, behavior)), amdp, "NOT AT END OF MODE", (0, combi_1.optPrio)(expressions_1.Redefinition)));
|
|
26
26
|
return ret;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
@@ -4,7 +4,7 @@ exports.CDSDetermineTypes = void 0;
|
|
|
4
4
|
const basic_1 = require("../abap/types/basic");
|
|
5
5
|
const ddic_1 = require("../ddic");
|
|
6
6
|
class CDSDetermineTypes {
|
|
7
|
-
parseType(reg, parsedData) {
|
|
7
|
+
parseType(reg, parsedData, ddlsName) {
|
|
8
8
|
const ddic = new ddic_1.DDIC(reg);
|
|
9
9
|
if ((parsedData === null || parsedData === void 0 ? void 0 : parsedData.fields.length) === 0) {
|
|
10
10
|
return new basic_1.VoidType("DDLS:todo");
|
|
@@ -30,7 +30,7 @@ class CDSDetermineTypes {
|
|
|
30
30
|
if ((source === null || source === void 0 ? void 0 : source.name) === undefined) {
|
|
31
31
|
components.push({
|
|
32
32
|
name: f.name,
|
|
33
|
-
type: new basic_1.UnknownType("CDS parser error, unknown source"),
|
|
33
|
+
type: new basic_1.UnknownType("CDS parser error, unknown source, " + ddlsName),
|
|
34
34
|
});
|
|
35
35
|
continue;
|
|
36
36
|
}
|
|
@@ -75,7 +75,7 @@ class CDSDetermineTypes {
|
|
|
75
75
|
else {
|
|
76
76
|
components.push({
|
|
77
77
|
name: f.name,
|
|
78
|
-
type: new basic_1.VoidType("DDLS:fieldname"),
|
|
78
|
+
type: new basic_1.VoidType("DDLS:fieldname:" + ddlsName),
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -38,7 +38,7 @@ class DataDefinition extends _abstract_object_1.AbstractObject {
|
|
|
38
38
|
}
|
|
39
39
|
parseType(reg) {
|
|
40
40
|
this.parse();
|
|
41
|
-
return new cds_determine_types_1.CDSDetermineTypes().parseType(reg, this.parsedData);
|
|
41
|
+
return new cds_determine_types_1.CDSDetermineTypes().parseType(reg, this.parsedData, this.getName());
|
|
42
42
|
}
|
|
43
43
|
getParsedData() {
|
|
44
44
|
return this.parsedData;
|
package/build/src/registry.js
CHANGED