@abaplint/core 2.83.1 → 2.83.5
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/README.md +6 -6
- package/build/abaplint.d.ts +12 -36
- package/build/src/abap/2_statements/expressions/index.js +0 -7
- package/build/src/abap/2_statements/statement_parser.js +1 -1
- package/build/src/abap/artifacts.js +3 -3
- package/build/src/abap/flow/flow_graph.js +7 -7
- package/build/src/cds/artifacts.js +18 -0
- package/build/src/cds/cds_lexer.js +133 -0
- package/build/src/cds/cds_parser.js +28 -0
- package/build/src/cds/expressions/cds_aggregate.js +13 -0
- package/build/src/cds/expressions/cds_annotation.js +13 -0
- package/build/src/cds/expressions/cds_annotation_array.js +15 -0
- package/build/src/cds/expressions/cds_annotation_object.js +16 -0
- package/build/src/cds/expressions/cds_annotation_simple.js +13 -0
- package/build/src/cds/expressions/cds_arithmetics.js +15 -0
- package/build/src/cds/expressions/cds_as.js +12 -0
- package/build/src/cds/expressions/cds_association.js +13 -0
- package/build/src/cds/expressions/cds_cardinality.js +12 -0
- package/build/src/cds/expressions/cds_case.js +16 -0
- package/build/src/cds/expressions/cds_cast.js +13 -0
- package/build/src/cds/expressions/cds_composition.js +13 -0
- package/build/src/cds/expressions/cds_condition.js +20 -0
- package/build/src/cds/expressions/cds_define_abstract.js +14 -0
- package/build/src/cds/expressions/cds_define_view.js +16 -0
- package/build/src/cds/expressions/cds_element.js +14 -0
- package/build/src/cds/expressions/cds_function.js +32 -0
- package/build/src/cds/expressions/cds_group_by.js +13 -0
- package/build/src/cds/expressions/cds_join.js +13 -0
- package/build/src/cds/expressions/cds_name.js +11 -0
- package/build/src/cds/expressions/cds_parameters.js +14 -0
- package/build/src/cds/expressions/cds_select.js +15 -0
- package/build/src/cds/expressions/cds_source.js +12 -0
- package/build/src/cds/expressions/cds_string.js +11 -0
- package/build/src/cds/expressions/cds_type.js +12 -0
- package/build/src/cds/expressions/cds_where.js +12 -0
- package/build/src/cds/expressions/cds_with_parameters.js +13 -0
- package/build/src/cds/expressions/index.js +41 -0
- package/build/src/config.js +1 -0
- package/build/src/ddl/artifacts.js +18 -0
- package/build/src/ddl/ddl_lexer.js +1 -1
- package/build/src/ddl/ddl_parser.js +1 -1
- package/build/src/{abap/2_statements/expressions/ddl → ddl/expressions}/ddl_include.js +1 -1
- package/build/src/{abap/2_statements/expressions/ddl → ddl/expressions}/ddl_name.js +1 -1
- package/build/src/{abap/2_statements/expressions/ddl → ddl/expressions}/ddl_structure.js +1 -1
- package/build/src/{abap/2_statements/expressions/ddl → ddl/expressions}/ddl_structure_field.js +1 -1
- package/build/src/{abap/2_statements/expressions/ddl → ddl/expressions}/ddl_table.js +1 -1
- package/build/src/{abap/2_statements/expressions/ddl → ddl/expressions}/ddl_table_field.js +1 -1
- package/build/src/{abap/2_statements/expressions/ddl → ddl/expressions}/ddl_type.js +1 -1
- package/build/src/ddl/expressions/index.js +20 -0
- package/build/src/index.js +2 -2
- package/build/src/lsp/help.js +7 -7
- package/build/src/objects/data_definition.js +68 -4
- package/build/src/registry.js +1 -1
- package/build/src/rules/7bit_ascii.js +5 -2
- package/build/src/rules/abapdoc.js +1 -1
- package/build/src/rules/align_parameters.js +33 -33
- package/build/src/rules/ambiguous_statement.js +5 -5
- package/build/src/rules/avoid_use.js +6 -6
- package/build/src/rules/begin_end_names.js +4 -4
- package/build/src/rules/begin_single_include.js +12 -12
- package/build/src/rules/call_transaction_authority_check.js +3 -3
- package/build/src/rules/cds_parser_error.js +46 -0
- package/build/src/rules/chain_mainly_declarations.js +4 -4
- package/build/src/rules/check_abstract.js +2 -2
- package/build/src/rules/check_comments.js +3 -3
- package/build/src/rules/check_include.js +3 -3
- package/build/src/rules/check_no_handler_pragma.js +8 -8
- package/build/src/rules/check_subrc.js +8 -8
- package/build/src/rules/commented_code.js +1 -1
- package/build/src/rules/constructor_visibility_public.js +4 -4
- package/build/src/rules/contains_tab.js +2 -2
- package/build/src/rules/dangerous_statement.js +1 -1
- package/build/src/rules/downport.js +35 -35
- package/build/src/rules/exit_or_check.js +3 -3
- package/build/src/rules/exporting.js +1 -1
- package/build/src/rules/forbidden_identifier.js +1 -1
- package/build/src/rules/forbidden_void_type.js +2 -2
- package/build/src/rules/functional_writing.js +17 -17
- package/build/src/rules/global_class.js +10 -10
- package/build/src/rules/identical_conditions.js +2 -2
- package/build/src/rules/identical_contents.js +15 -15
- package/build/src/rules/identical_descriptions.js +4 -4
- package/build/src/rules/if_in_if.js +7 -7
- package/build/src/rules/implement_methods.js +3 -3
- package/build/src/rules/in_statement_indentation.js +11 -11
- package/build/src/rules/index.js +1 -0
- package/build/src/rules/intf_referencing_clas.js +3 -3
- package/build/src/rules/line_break_style.js +2 -2
- package/build/src/rules/line_length.js +1 -1
- package/build/src/rules/line_only_punc.js +1 -1
- package/build/src/rules/local_variable_names.js +2 -2
- package/build/src/rules/many_parentheses.js +10 -10
- package/build/src/rules/max_one_method_parameter_per_line.js +7 -7
- package/build/src/rules/max_one_statement.js +3 -3
- package/build/src/rules/nesting.js +1 -1
- package/build/src/rules/no_chained_assignment.js +1 -1
- package/build/src/rules/no_public_attributes.js +1 -1
- package/build/src/rules/no_yoda_conditions.js +4 -4
- package/build/src/rules/obsolete_statement.js +40 -38
- package/build/src/rules/omit_parameter_name.js +3 -3
- package/build/src/rules/omit_receiving.js +13 -13
- package/build/src/rules/parser_702_chaining.js +2 -2
- package/build/src/rules/parser_error.js +2 -2
- package/build/src/rules/parser_missing_space.js +1 -1
- package/build/src/rules/prefer_inline.js +16 -16
- package/build/src/rules/prefer_is_not.js +7 -7
- package/build/src/rules/prefer_raise_exception_new.js +3 -3
- package/build/src/rules/prefer_returning_to_exporting.js +1 -1
- package/build/src/rules/prefer_xsdbool.js +2 -2
- package/build/src/rules/remove_descriptions.js +4 -4
- package/build/src/rules/rfc_error_handling.js +9 -9
- package/build/src/rules/select_add_order_by.js +5 -5
- package/build/src/rules/select_performance.js +2 -2
- package/build/src/rules/sicf_consistency.js +4 -4
- package/build/src/rules/space_before_dot.js +2 -2
- package/build/src/rules/start_at_tab.js +1 -1
- package/build/src/rules/sy_modification.js +2 -2
- package/build/src/rules/tabl_enhancement_category.js +2 -2
- package/build/src/rules/unused_methods.js +9 -9
- package/build/src/rules/unused_variables.js +6 -6
- package/build/src/rules/use_bool_expression.js +8 -8
- package/build/src/rules/use_line_exists.js +6 -6
- package/build/src/rules/use_new.js +2 -2
- package/build/src/rules/when_others_last.js +6 -6
- package/package.json +66 -66
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# @abaplint/core
|
|
2
|
-
|
|
3
|
-
[abaplint](https://abaplint.org/) core library
|
|
4
|
-
|
|
5
|
-
Exposes functionallity like the parser and rules, which can be used in other projects.
|
|
6
|
-
|
|
1
|
+
# @abaplint/core
|
|
2
|
+
|
|
3
|
+
[abaplint](https://abaplint.org/) core library
|
|
4
|
+
|
|
5
|
+
Exposes functionallity like the parser and rules, which can be used in other projects.
|
|
6
|
+
|
|
7
7
|
For more information see https://github.com/abaplint/abaplint
|
package/build/abaplint.d.ts
CHANGED
|
@@ -170,7 +170,7 @@ declare class ArrowOrDash extends Expression {
|
|
|
170
170
|
getRunnable(): IStatementRunnable;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
export declare class
|
|
173
|
+
export declare class ArtifactsABAP {
|
|
174
174
|
static getStructures(): IStructure[];
|
|
175
175
|
static getExpressions(): (new () => Expression)[];
|
|
176
176
|
static getStatements(): IStatement[];
|
|
@@ -1114,6 +1114,9 @@ declare class DataControl extends AbstractObject {
|
|
|
1114
1114
|
|
|
1115
1115
|
declare class DataDefinition extends AbstractObject {
|
|
1116
1116
|
private sqlViewName;
|
|
1117
|
+
private parserError;
|
|
1118
|
+
private fieldNames;
|
|
1119
|
+
private sources;
|
|
1117
1120
|
getType(): string;
|
|
1118
1121
|
getAllowedNaming(): {
|
|
1119
1122
|
maxLength: number;
|
|
@@ -1122,8 +1125,16 @@ declare class DataDefinition extends AbstractObject {
|
|
|
1122
1125
|
getSQLViewName(): string | undefined;
|
|
1123
1126
|
getDescription(): string | undefined;
|
|
1124
1127
|
parseType(_reg: IRegistry): AbstractType;
|
|
1128
|
+
listSources(): {
|
|
1129
|
+
name: string;
|
|
1130
|
+
as: string | undefined;
|
|
1131
|
+
}[];
|
|
1125
1132
|
setDirty(): void;
|
|
1133
|
+
findSourceFile(): IFile | undefined;
|
|
1134
|
+
hasParserError(): boolean | undefined;
|
|
1126
1135
|
parse(): IParseResult;
|
|
1136
|
+
private findFieldNames;
|
|
1137
|
+
private findSources;
|
|
1127
1138
|
}
|
|
1128
1139
|
|
|
1129
1140
|
declare class DataDefinition_2 extends Expression {
|
|
@@ -1188,44 +1199,16 @@ declare class DDIC {
|
|
|
1188
1199
|
textToType(text: string | undefined, length: string | undefined, decimals: string | undefined, parent: string, qualify?: boolean): AbstractType;
|
|
1189
1200
|
}
|
|
1190
1201
|
|
|
1191
|
-
declare class DDLInclude extends Expression {
|
|
1192
|
-
getRunnable(): IStatementRunnable;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
1202
|
declare enum DDLKind {
|
|
1196
1203
|
Structure = "structure",
|
|
1197
1204
|
Table = "table"
|
|
1198
1205
|
}
|
|
1199
1206
|
|
|
1200
|
-
declare class DDLName extends Expression {
|
|
1201
|
-
getRunnable(): IStatementRunnable;
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
1207
|
export declare class DDLParser {
|
|
1205
1208
|
parse(file: IFile): IDDLParserResult | undefined;
|
|
1206
1209
|
private parsedToResult;
|
|
1207
1210
|
}
|
|
1208
1211
|
|
|
1209
|
-
declare class DDLStructure extends Expression {
|
|
1210
|
-
getRunnable(): IStatementRunnable;
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
declare class DDLStructureField extends Expression {
|
|
1214
|
-
getRunnable(): IStatementRunnable;
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
declare class DDLTable extends Expression {
|
|
1218
|
-
getRunnable(): IStatementRunnable;
|
|
1219
|
-
}
|
|
1220
|
-
|
|
1221
|
-
declare class DDLTableField extends Expression {
|
|
1222
|
-
getRunnable(): IStatementRunnable;
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
|
-
declare class DDLType extends Expression {
|
|
1226
|
-
getRunnable(): IStatementRunnable;
|
|
1227
|
-
}
|
|
1228
|
-
|
|
1229
1212
|
declare class DecFloat16Type extends AbstractType {
|
|
1230
1213
|
toText(): string;
|
|
1231
1214
|
isGeneric(): boolean;
|
|
@@ -1689,13 +1672,6 @@ declare namespace Expressions {
|
|
|
1689
1672
|
DataDefinition_2 as DataDefinition,
|
|
1690
1673
|
DatabaseConnection,
|
|
1691
1674
|
DatabaseTable,
|
|
1692
|
-
DDLInclude,
|
|
1693
|
-
DDLName,
|
|
1694
|
-
DDLStructureField,
|
|
1695
|
-
DDLStructure,
|
|
1696
|
-
DDLTableField,
|
|
1697
|
-
DDLTable,
|
|
1698
|
-
DDLType,
|
|
1699
1675
|
Decimals,
|
|
1700
1676
|
Default,
|
|
1701
1677
|
DefinitionName,
|
|
@@ -47,13 +47,6 @@ __exportStar(require("./corresponding_body"), exports);
|
|
|
47
47
|
__exportStar(require("./data_definition"), exports);
|
|
48
48
|
__exportStar(require("./database_connection"), exports);
|
|
49
49
|
__exportStar(require("./database_table"), exports);
|
|
50
|
-
__exportStar(require("./ddl/ddl_include"), exports);
|
|
51
|
-
__exportStar(require("./ddl/ddl_name"), exports);
|
|
52
|
-
__exportStar(require("./ddl/ddl_structure_field"), exports);
|
|
53
|
-
__exportStar(require("./ddl/ddl_structure"), exports);
|
|
54
|
-
__exportStar(require("./ddl/ddl_table_field"), exports);
|
|
55
|
-
__exportStar(require("./ddl/ddl_table"), exports);
|
|
56
|
-
__exportStar(require("./ddl/ddl_type"), exports);
|
|
57
50
|
__exportStar(require("./decimals"), exports);
|
|
58
51
|
__exportStar(require("./default"), exports);
|
|
59
52
|
__exportStar(require("./definition_name"), exports);
|
|
@@ -14,7 +14,7 @@ exports.STATEMENT_MAX_TOKENS = 1000;
|
|
|
14
14
|
class StatementMap {
|
|
15
15
|
constructor() {
|
|
16
16
|
this.map = {};
|
|
17
|
-
for (const stat of artifacts_1.
|
|
17
|
+
for (const stat of artifacts_1.ArtifactsABAP.getStatements()) {
|
|
18
18
|
const f = stat.getMatcher().first();
|
|
19
19
|
if (f.length === 0) {
|
|
20
20
|
throw new Error("StatementMap, first must have contents");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ArtifactsABAP = void 0;
|
|
4
4
|
const Statements = require("./2_statements/statements");
|
|
5
5
|
const Expressions = require("./2_statements/expressions");
|
|
6
6
|
const combi_1 = require("./2_statements/combi");
|
|
@@ -35,7 +35,7 @@ class List {
|
|
|
35
35
|
function className(cla) {
|
|
36
36
|
return cla.constructor.name;
|
|
37
37
|
}
|
|
38
|
-
class
|
|
38
|
+
class ArtifactsABAP {
|
|
39
39
|
static getStructures() {
|
|
40
40
|
const ret = [];
|
|
41
41
|
const list = Structures;
|
|
@@ -77,5 +77,5 @@ class Artifacts {
|
|
|
77
77
|
return list.get();
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
exports.
|
|
80
|
+
exports.ArtifactsABAP = ArtifactsABAP;
|
|
81
81
|
//# sourceMappingURL=artifacts.js.map
|
|
@@ -72,13 +72,13 @@ class FlowGraph {
|
|
|
72
72
|
this.label = label;
|
|
73
73
|
}
|
|
74
74
|
toDigraph() {
|
|
75
|
-
return `digraph G {
|
|
76
|
-
labelloc="t";
|
|
77
|
-
label="${this.label}";
|
|
78
|
-
graph [fontname = "helvetica"];
|
|
79
|
-
node [fontname = "helvetica", shape="box"];
|
|
80
|
-
edge [fontname = "helvetica"];
|
|
81
|
-
${this.toTextEdges()}
|
|
75
|
+
return `digraph G {
|
|
76
|
+
labelloc="t";
|
|
77
|
+
label="${this.label}";
|
|
78
|
+
graph [fontname = "helvetica"];
|
|
79
|
+
node [fontname = "helvetica", shape="box"];
|
|
80
|
+
edge [fontname = "helvetica"];
|
|
81
|
+
${this.toTextEdges()}
|
|
82
82
|
}`;
|
|
83
83
|
}
|
|
84
84
|
listSources(node) {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArtifactsCDS = void 0;
|
|
4
|
+
const Expressions = require("./expressions");
|
|
5
|
+
class ArtifactsCDS {
|
|
6
|
+
static getExpressions() {
|
|
7
|
+
const ret = [];
|
|
8
|
+
const list = Expressions;
|
|
9
|
+
for (const key in Expressions) {
|
|
10
|
+
if (typeof list[key] === "function") {
|
|
11
|
+
ret.push(list[key]);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
return ret;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ArtifactsCDS = ArtifactsCDS;
|
|
18
|
+
//# sourceMappingURL=artifacts.js.map
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSLexer = void 0;
|
|
4
|
+
const tokens_1 = require("../abap/1_lexer/tokens");
|
|
5
|
+
const position_1 = require("../position");
|
|
6
|
+
// todo: Keywords must be all uppercase, all lowercase, or in lowercase with an
|
|
7
|
+
// uppercase initial letter. Other mixes of uppercase and lowercase are not allowed
|
|
8
|
+
class Stream {
|
|
9
|
+
constructor(buffer) {
|
|
10
|
+
this.buffer = buffer;
|
|
11
|
+
}
|
|
12
|
+
takeNext() {
|
|
13
|
+
const next = this.buffer.substring(0, 1);
|
|
14
|
+
this.buffer = this.buffer.substring(1);
|
|
15
|
+
return next;
|
|
16
|
+
}
|
|
17
|
+
peekNext() {
|
|
18
|
+
const next = this.buffer.substring(0, 1);
|
|
19
|
+
return next;
|
|
20
|
+
}
|
|
21
|
+
length() {
|
|
22
|
+
return this.buffer.length;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
class Result {
|
|
26
|
+
constructor() {
|
|
27
|
+
this.result = [];
|
|
28
|
+
}
|
|
29
|
+
add(text, row, col) {
|
|
30
|
+
if (text.length > 0) {
|
|
31
|
+
this.result.push(new tokens_1.Identifier(new position_1.Position(row, col), text));
|
|
32
|
+
}
|
|
33
|
+
return "";
|
|
34
|
+
}
|
|
35
|
+
get() {
|
|
36
|
+
return this.result;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
var Mode;
|
|
40
|
+
(function (Mode) {
|
|
41
|
+
Mode[Mode["Default"] = 0] = "Default";
|
|
42
|
+
Mode[Mode["String"] = 1] = "String";
|
|
43
|
+
Mode[Mode["SingleLineComment"] = 2] = "SingleLineComment";
|
|
44
|
+
Mode[Mode["MultiLineComment"] = 3] = "MultiLineComment";
|
|
45
|
+
})(Mode || (Mode = {}));
|
|
46
|
+
class CDSLexer {
|
|
47
|
+
static run(file) {
|
|
48
|
+
const result = new Result();
|
|
49
|
+
let mode = Mode.Default;
|
|
50
|
+
let row = 1;
|
|
51
|
+
let col = 1;
|
|
52
|
+
let build = "";
|
|
53
|
+
const stream = new Stream(file.getRaw().replace(/\r/g, "").replace(/\u00a0/g, " "));
|
|
54
|
+
let next = "";
|
|
55
|
+
while (stream.length() > 0) {
|
|
56
|
+
const prev = next;
|
|
57
|
+
next = stream.takeNext();
|
|
58
|
+
const nextNext = stream.peekNext();
|
|
59
|
+
col++;
|
|
60
|
+
// string handling
|
|
61
|
+
if (mode === Mode.String) {
|
|
62
|
+
build += next;
|
|
63
|
+
if (next === "'") {
|
|
64
|
+
build = result.add(build, row, col);
|
|
65
|
+
mode = Mode.Default;
|
|
66
|
+
}
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
// single line comment handling
|
|
70
|
+
if (mode === Mode.SingleLineComment) {
|
|
71
|
+
if (next === "\n") {
|
|
72
|
+
mode = Mode.Default;
|
|
73
|
+
}
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
else if (mode === Mode.Default && next === "/" && nextNext === "/") {
|
|
77
|
+
mode = Mode.SingleLineComment;
|
|
78
|
+
build = result.add(build, row, col);
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
// multi line comment handling
|
|
82
|
+
if (mode === Mode.MultiLineComment) {
|
|
83
|
+
if (prev === "*" && next === "/") {
|
|
84
|
+
mode = Mode.Default;
|
|
85
|
+
}
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
else if (mode === Mode.Default && next === "/" && nextNext === "*") {
|
|
89
|
+
mode = Mode.MultiLineComment;
|
|
90
|
+
build = result.add(build, row, col);
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
switch (next) {
|
|
94
|
+
case "'":
|
|
95
|
+
mode = Mode.String;
|
|
96
|
+
build += next;
|
|
97
|
+
break;
|
|
98
|
+
case " ":
|
|
99
|
+
build = result.add(build, row, col);
|
|
100
|
+
break;
|
|
101
|
+
case "\n":
|
|
102
|
+
build = result.add(build, row, col);
|
|
103
|
+
row++;
|
|
104
|
+
col = 0;
|
|
105
|
+
break;
|
|
106
|
+
case ";":
|
|
107
|
+
case ":":
|
|
108
|
+
case ",":
|
|
109
|
+
case ".":
|
|
110
|
+
case "{":
|
|
111
|
+
case "}":
|
|
112
|
+
case "(":
|
|
113
|
+
case ")":
|
|
114
|
+
case "[":
|
|
115
|
+
case "]":
|
|
116
|
+
case "+":
|
|
117
|
+
case "-":
|
|
118
|
+
case "*":
|
|
119
|
+
case "/":
|
|
120
|
+
build = result.add(build, row, col);
|
|
121
|
+
result.add(next, row, col);
|
|
122
|
+
break;
|
|
123
|
+
default:
|
|
124
|
+
build += next;
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
result.add(build, row, col);
|
|
129
|
+
return result.get();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
exports.CDSLexer = CDSLexer;
|
|
133
|
+
//# sourceMappingURL=cds_lexer.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSParser = void 0;
|
|
4
|
+
const combi_1 = require("../abap/2_statements/combi");
|
|
5
|
+
const nodes_1 = require("../abap/nodes");
|
|
6
|
+
const version_1 = require("../version");
|
|
7
|
+
const cds_lexer_1 = require("./cds_lexer");
|
|
8
|
+
const Expressions = require("./expressions");
|
|
9
|
+
// todo: the names of the ABAP + CDS + DDL expressions might overlap, if overlapping the singleton will fail
|
|
10
|
+
class CDSParser {
|
|
11
|
+
parse(file) {
|
|
12
|
+
if (file === undefined) {
|
|
13
|
+
return undefined;
|
|
14
|
+
}
|
|
15
|
+
const tokens = cds_lexer_1.CDSLexer.run(file);
|
|
16
|
+
// console.dir(tokens);
|
|
17
|
+
let res = combi_1.Combi.run(new Expressions.CDSDefineView(), tokens, version_1.defaultVersion);
|
|
18
|
+
if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
|
|
19
|
+
res = combi_1.Combi.run(new Expressions.CDSDefineAbstract(), tokens, version_1.defaultVersion);
|
|
20
|
+
}
|
|
21
|
+
if (res === undefined || !(res[0] instanceof nodes_1.ExpressionNode)) {
|
|
22
|
+
return undefined;
|
|
23
|
+
}
|
|
24
|
+
return res[0];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.CDSParser = CDSParser;
|
|
28
|
+
//# sourceMappingURL=cds_parser.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSAggregate = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
class CDSAggregate extends combi_1.Expression {
|
|
7
|
+
getRunnable() {
|
|
8
|
+
const value = (0, combi_1.alt)(_1.CDSName, _1.CDSCast, _1.CDSCase);
|
|
9
|
+
return (0, combi_1.seq)((0, combi_1.alt)("MAX", "MIN", "SUM", "AVG", "COUNT"), "(", (0, combi_1.opt)("DISTINCT"), value, ")");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.CDSAggregate = CDSAggregate;
|
|
13
|
+
//# sourceMappingURL=cds_aggregate.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSAnnotation = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
const cds_annotation_array_1 = require("./cds_annotation_array");
|
|
7
|
+
class CDSAnnotation extends combi_1.Expression {
|
|
8
|
+
getRunnable() {
|
|
9
|
+
return (0, combi_1.seq)((0, combi_1.regex)(/^@\w+$/), (0, combi_1.star)((0, combi_1.seq)(".", (0, combi_1.regex)(/^\w+$/))), (0, combi_1.opt)(":"), (0, combi_1.opt)((0, combi_1.alt)(cds_annotation_array_1.CDSAnnotationArray, _1.CDSAnnotationObject, _1.CDSAnnotationSimple)));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.CDSAnnotation = CDSAnnotation;
|
|
13
|
+
//# sourceMappingURL=cds_annotation.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSAnnotationArray = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
const cds_annotation_simple_1 = require("./cds_annotation_simple");
|
|
7
|
+
class CDSAnnotationArray extends combi_1.Expression {
|
|
8
|
+
getRunnable() {
|
|
9
|
+
const value = (0, combi_1.alt)(cds_annotation_simple_1.CDSAnnotationSimple, _1.CDSAnnotationObject, CDSAnnotationArray);
|
|
10
|
+
const valueList = (0, combi_1.seq)("[", value, (0, combi_1.star)((0, combi_1.seq)(",", value)), "]");
|
|
11
|
+
return valueList;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.CDSAnnotationArray = CDSAnnotationArray;
|
|
15
|
+
//# sourceMappingURL=cds_annotation_array.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSAnnotationObject = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
const cds_annotation_simple_1 = require("./cds_annotation_simple");
|
|
7
|
+
class CDSAnnotationObject extends combi_1.Expression {
|
|
8
|
+
getRunnable() {
|
|
9
|
+
const value = (0, combi_1.alt)(CDSAnnotationObject, _1.CDSAnnotationArray, cds_annotation_simple_1.CDSAnnotationSimple);
|
|
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)), "}");
|
|
12
|
+
return valueNested;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.CDSAnnotationObject = CDSAnnotationObject;
|
|
16
|
+
//# sourceMappingURL=cds_annotation_object.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSAnnotationSimple = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
class CDSAnnotationSimple extends combi_1.Expression {
|
|
7
|
+
getRunnable() {
|
|
8
|
+
const value = (0, combi_1.alt)(_1.CDSString, "true", "false", (0, combi_1.regex)(/^\d+$/), (0, combi_1.seq)((0, combi_1.regex)(/^\d+$/), ".", (0, combi_1.regex)(/^\d+$/)), (0, combi_1.regex)(/^#[\w_]+$/));
|
|
9
|
+
return value;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.CDSAnnotationSimple = CDSAnnotationSimple;
|
|
13
|
+
//# sourceMappingURL=cds_annotation_simple.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSArithmetics = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
class CDSArithmetics extends combi_1.Expression {
|
|
7
|
+
getRunnable() {
|
|
8
|
+
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
|
|
9
|
+
const val = (0, combi_1.alt)((0, combi_1.regex)(/\d+/), name, _1.CDSFunction, _1.CDSCase, _1.CDSCast, _1.CDSString);
|
|
10
|
+
const operator = (0, combi_1.alt)("+", "-", "*", "/");
|
|
11
|
+
return (0, combi_1.seq)(val, operator, val);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.CDSArithmetics = CDSArithmetics;
|
|
15
|
+
//# sourceMappingURL=cds_arithmetics.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSAs = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
class CDSAs extends combi_1.Expression {
|
|
7
|
+
getRunnable() {
|
|
8
|
+
return (0, combi_1.seq)("AS", _1.CDSName);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.CDSAs = CDSAs;
|
|
12
|
+
//# sourceMappingURL=cds_as.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSAssociation = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
const cds_cardinality_1 = require("./cds_cardinality");
|
|
7
|
+
class CDSAssociation extends combi_1.Expression {
|
|
8
|
+
getRunnable() {
|
|
9
|
+
return (0, combi_1.seq)("ASSOCIATION", (0, combi_1.opt)(cds_cardinality_1.CDSCardinality), "TO", (0, combi_1.opt)("PARENT"), _1.CDSName, (0, combi_1.opt)(_1.CDSAs), "ON", _1.CDSCondition);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.CDSAssociation = CDSAssociation;
|
|
13
|
+
//# sourceMappingURL=cds_association.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSCardinality = void 0;
|
|
4
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
5
|
+
class CDSCardinality extends combi_1.Expression {
|
|
6
|
+
getRunnable() {
|
|
7
|
+
const cardinality = (0, combi_1.seq)("[", (0, combi_1.alt)("0", "1"), (0, combi_1.opt)((0, combi_1.seq)(".", ".", (0, combi_1.alt)("0", "1", "*"))), "]");
|
|
8
|
+
return cardinality;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.CDSCardinality = CDSCardinality;
|
|
12
|
+
//# sourceMappingURL=cds_cardinality.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSCase = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
class CDSCase extends combi_1.Expression {
|
|
7
|
+
getRunnable() {
|
|
8
|
+
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
|
|
9
|
+
const value = (0, combi_1.alt)(name, _1.CDSString, _1.CDSFunction, CDSCase, _1.CDSCast, _1.CDSArithmetics);
|
|
10
|
+
const simple = (0, combi_1.seq)("CASE", name, (0, combi_1.plus)((0, combi_1.seq)("WHEN", value, "THEN", value)), "ELSE", value, "END");
|
|
11
|
+
const complex = (0, combi_1.seq)("CASE", (0, combi_1.plus)((0, combi_1.seq)("WHEN", _1.CDSCondition, "THEN", value)), (0, combi_1.opt)((0, combi_1.seq)("ELSE", value)), "END");
|
|
12
|
+
return (0, combi_1.alt)(simple, complex);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.CDSCase = CDSCase;
|
|
16
|
+
//# sourceMappingURL=cds_case.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSCast = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
class CDSCast extends combi_1.Expression {
|
|
7
|
+
getRunnable() {
|
|
8
|
+
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", _1.CDSName)));
|
|
9
|
+
return (0, combi_1.seq)("CAST", "(", (0, combi_1.alt)(name, _1.CDSFunction, _1.CDSCase, CDSCast, _1.CDSString, _1.CDSArithmetics), "AS", _1.CDSType, (0, combi_1.opt)((0, combi_1.seq)("PRESERVING", "TYPE")), ")");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.CDSCast = CDSCast;
|
|
13
|
+
//# sourceMappingURL=cds_cast.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSComposition = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
const cds_cardinality_1 = require("./cds_cardinality");
|
|
7
|
+
class CDSComposition extends combi_1.Expression {
|
|
8
|
+
getRunnable() {
|
|
9
|
+
return (0, combi_1.seq)("COMPOSITION", (0, combi_1.opt)(cds_cardinality_1.CDSCardinality), "OF", _1.CDSName, (0, combi_1.opt)(_1.CDSAs));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.CDSComposition = CDSComposition;
|
|
13
|
+
//# sourceMappingURL=cds_composition.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSCondition = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
class CDSCondition extends combi_1.Expression {
|
|
7
|
+
getRunnable() {
|
|
8
|
+
const name = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)((0, combi_1.seq)(".", (0, combi_1.alt)(_1.CDSName, _1.CDSString))));
|
|
9
|
+
const eq = (0, combi_1.seq)(name, (0, combi_1.alt)("=", "<>", "<", ">", ">=", "<="), (0, combi_1.alt)(name, _1.CDSFunction, _1.CDSString));
|
|
10
|
+
const isInitial = (0, combi_1.seq)(name, "IS INITIAL");
|
|
11
|
+
const isNotInitial = (0, combi_1.seq)(name, "IS NOT INITIAL");
|
|
12
|
+
const isNull = (0, combi_1.seq)(name, "IS NULL");
|
|
13
|
+
const isNotNull = (0, combi_1.seq)(name, "IS NOT NULL");
|
|
14
|
+
const condition = (0, combi_1.alt)(eq, isNull, isNotNull, isInitial, isNotInitial);
|
|
15
|
+
const paren = (0, combi_1.seq)("(", CDSCondition, ")");
|
|
16
|
+
return (0, combi_1.seq)((0, combi_1.alt)(condition, paren), (0, combi_1.star)((0, combi_1.seq)((0, combi_1.alt)("AND", "OR"), (0, combi_1.alt)(condition, paren))));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.CDSCondition = CDSCondition;
|
|
20
|
+
//# sourceMappingURL=cds_condition.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSDefineAbstract = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
const cds_name_1 = require("./cds_name");
|
|
7
|
+
class CDSDefineAbstract extends combi_1.Expression {
|
|
8
|
+
getRunnable() {
|
|
9
|
+
const field = (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("KEY"), cds_name_1.CDSName, ":", cds_name_1.CDSName, ";");
|
|
10
|
+
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.str)("DEFINE ABSTRACT ENTITY"), cds_name_1.CDSName, (0, combi_1.str)("{"), (0, combi_1.plus)(field), (0, combi_1.str)("}"), (0, combi_1.opt)(";"));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.CDSDefineAbstract = CDSDefineAbstract;
|
|
14
|
+
//# sourceMappingURL=cds_define_abstract.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSDefineView = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const __1 = require("../..");
|
|
6
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
7
|
+
const cds_name_1 = require("./cds_name");
|
|
8
|
+
const cds_select_1 = require("./cds_select");
|
|
9
|
+
const cds_with_parameters_1 = require("./cds_with_parameters");
|
|
10
|
+
class CDSDefineView extends combi_1.Expression {
|
|
11
|
+
getRunnable() {
|
|
12
|
+
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), "DEFINE", (0, combi_1.opt)("ROOT"), "VIEW", (0, combi_1.ver)(__1.Version.v755, (0, combi_1.opt)("ENTITY")), cds_name_1.CDSName, (0, combi_1.opt)(cds_with_parameters_1.CDSWithParameters), "AS", cds_select_1.CDSSelect, (0, combi_1.opt)(";"));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.CDSDefineView = CDSDefineView;
|
|
16
|
+
//# sourceMappingURL=cds_define_view.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSElement = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
const cds_as_1 = require("./cds_as");
|
|
7
|
+
const cds_cast_1 = require("./cds_cast");
|
|
8
|
+
class CDSElement extends combi_1.Expression {
|
|
9
|
+
getRunnable() {
|
|
10
|
+
return (0, combi_1.seq)((0, combi_1.star)(_1.CDSAnnotation), (0, combi_1.optPrio)("KEY"), (0, combi_1.alt)((0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParameters), (0, combi_1.star)((0, combi_1.seq)(".", _1.CDSName, (0, combi_1.opt)(_1.CDSParameters)))), cds_cast_1.CDSCast, _1.CDSAggregate, _1.CDSString, _1.CDSFunction, (0, combi_1.regex)(/^\d+$/), _1.CDSArithmetics, _1.CDSCase), (0, combi_1.opt)(cds_as_1.CDSAs));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.CDSElement = CDSElement;
|
|
14
|
+
//# sourceMappingURL=cds_element.js.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CDSFunction = void 0;
|
|
4
|
+
const _1 = require(".");
|
|
5
|
+
const combi_1 = require("../../abap/2_statements/combi");
|
|
6
|
+
class CDSFunction extends combi_1.Expression {
|
|
7
|
+
getRunnable() {
|
|
8
|
+
const qualified = (0, combi_1.seq)(_1.CDSName, (0, combi_1.opt)(_1.CDSParameters), (0, combi_1.star)((0, combi_1.seq)(".", _1.CDSName, (0, combi_1.opt)(_1.CDSParameters))));
|
|
9
|
+
const input = (0, combi_1.alt)(qualified, (0, combi_1.regex)(/^\d+$/), _1.CDSCast, CDSFunction, _1.CDSArithmetics, _1.CDSCase, _1.CDSString);
|
|
10
|
+
const coalesce = (0, combi_1.seq)("COALESCE", "(", input, ",", input, ")");
|
|
11
|
+
const concat = (0, combi_1.seq)("CONCAT", "(", input, ",", input, ")");
|
|
12
|
+
const concat_with_space = (0, combi_1.seq)("CONCAT_WITH_SPACE", "(", input, ",", input, ",", input, ")");
|
|
13
|
+
const dats_add_days = (0, combi_1.seq)("DATS_ADD_DAYS", "(", input, ",", input, ",", input, ")");
|
|
14
|
+
const dats_add_months = (0, combi_1.seq)("DATS_ADD_MONTHS", "(", input, ",", input, ",", input, ")");
|
|
15
|
+
const dats_days_between = (0, combi_1.seq)("DATS_DAYS_BETWEEN", "(", input, ",", input, ")");
|
|
16
|
+
const dats_is_valid = (0, combi_1.seq)("DATS_IS_VALID", "(", input, ")");
|
|
17
|
+
const substring = (0, combi_1.seq)("SUBSTRING", "(", input, ",", input, ",", input, ")");
|
|
18
|
+
const tstmp_to_dats = (0, combi_1.seq)("TSTMP_TO_DATS", "(", input, ",", input, ",", input, ",", input, ")");
|
|
19
|
+
const tstmp_to_tims = (0, combi_1.seq)("TSTMP_TO_TIMS", "(", input, ",", input, ",", input, ",", input, ")");
|
|
20
|
+
const tstmp_to_dst = (0, combi_1.seq)("TSTMP_TO_DST", "(", input, ",", input, ",", input, ",", input, ")");
|
|
21
|
+
const dats_tims_to_tstmp = (0, combi_1.seq)("DATS_TIMS_TO_TSTMP", "(", input, ",", input, ",", input, ",", input, ",", input, ")");
|
|
22
|
+
const tstmp_is_valid = (0, combi_1.seq)("TSTMP_IS_VALID", "(", input, ")");
|
|
23
|
+
const tstmp_current_utctimestamp = (0, combi_1.seq)("TSTMP_CURRENT_UTCTIMESTAMP", "(", ")");
|
|
24
|
+
const tstmp_seconds_between = (0, combi_1.seq)("TSTMP_SECONDS_BETWEEN", "(", input, ",", input, ",", input, ")");
|
|
25
|
+
const tstmp_add_seconds = (0, combi_1.seq)("TSTMP_ADD_SECONDS", "(", input, ",", input, ",", input, ")");
|
|
26
|
+
const abap_system_timezone = (0, combi_1.seq)("ABAP_SYSTEM_TIMEZONE", "(", input, ",", input, ")");
|
|
27
|
+
const abap_user_timezone = (0, combi_1.seq)("ABAP_USER_TIMEZONE", "(", input, ",", input, ",", input, ")");
|
|
28
|
+
return (0, combi_1.alt)(substring, coalesce, tstmp_to_dats, concat, tstmp_to_tims, concat_with_space, dats_is_valid, dats_days_between, tstmp_add_seconds, tstmp_seconds_between, tstmp_current_utctimestamp, tstmp_is_valid, abap_system_timezone, abap_user_timezone, dats_add_days, dats_add_months, tstmp_to_dst, dats_tims_to_tstmp);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.CDSFunction = CDSFunction;
|
|
32
|
+
//# sourceMappingURL=cds_function.js.map
|