@abaplint/core 2.90.6 → 2.90.10
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 +15 -0
- package/build/src/abap/1_lexer/lexer.js +10 -7
- package/build/src/abap/2_statements/expressions/association_name.js +11 -0
- package/build/src/abap/2_statements/expressions/index.js +1 -0
- package/build/src/abap/2_statements/expressions/method_param_name.js +1 -1
- package/build/src/abap/2_statements/statements/commit_entities.js +1 -1
- package/build/src/abap/2_statements/statements/delete_internal.js +3 -2
- package/build/src/abap/2_statements/statements/get_permissions.js +14 -0
- package/build/src/abap/2_statements/statements/index.js +2 -0
- package/build/src/abap/2_statements/statements/modify_entities.js +3 -1
- package/build/src/abap/2_statements/statements/read_entities.js +1 -1
- package/build/src/abap/2_statements/statements/set_locks.js +14 -0
- package/build/src/abap/3_structures/structures/normal.js +1 -1
- package/build/src/abap/5_syntax/_builtin.js +5 -5
- package/build/src/abap/5_syntax/expressions/form_param.js +4 -4
- package/build/src/abap/5_syntax/expressions/inline_data.js +2 -2
- package/build/src/abap/5_syntax/expressions/inline_field_definition.js +1 -1
- package/build/src/abap/5_syntax/expressions/inline_fs.js +2 -2
- package/build/src/abap/5_syntax/expressions/inline_loop_definition.js +2 -2
- package/build/src/abap/5_syntax/statements/catch.js +3 -3
- package/build/src/abap/5_syntax/statements/class_data.js +1 -1
- package/build/src/abap/5_syntax/statements/constant.js +1 -1
- package/build/src/abap/5_syntax/statements/selection_screen.js +2 -2
- package/build/src/abap/5_syntax/structures/class_data.js +1 -1
- package/build/src/abap/5_syntax/structures/constants.js +1 -1
- package/build/src/abap/5_syntax/structures/type_enum.js +2 -2
- package/build/src/abap/flow/flow_graph.js +7 -7
- package/build/src/abap/types/class_constant.js +1 -1
- package/build/src/abap/types/form_definition.js +2 -2
- package/build/src/abap/types/method_parameters.js +11 -11
- package/build/src/lsp/_lookup.js +1 -1
- package/build/src/lsp/help.js +7 -7
- package/build/src/objects/table.js +22 -0
- package/build/src/registry.js +1 -1
- package/build/src/rules/7bit_ascii.js +2 -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 +8 -8
- 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/chain_mainly_declarations.js +4 -4
- package/build/src/rules/check_abstract.js +2 -2
- package/build/src/rules/check_comments.js +4 -4
- package/build/src/rules/check_include.js +3 -3
- package/build/src/rules/check_subrc.js +8 -8
- package/build/src/rules/classic_exceptions_overlap.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 +6 -5
- package/build/src/rules/downport.js +65 -65
- package/build/src/rules/exit_or_check.js +4 -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 +8 -8
- package/build/src/rules/identical_conditions.js +2 -2
- package/build/src/rules/identical_contents.js +14 -14
- 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/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/method_overwrites_builtin.js +2 -2
- package/build/src/rules/nesting.js +1 -1
- package/build/src/rules/no_chained_assignment.js +1 -1
- package/build/src/rules/no_external_form_calls.js +2 -2
- package/build/src/rules/no_inline_in_optional_branches.js +11 -11
- package/build/src/rules/no_public_attributes.js +1 -1
- package/build/src/rules/no_yoda_conditions.js +4 -4
- package/build/src/rules/nrob_consistency.js +2 -2
- package/build/src/rules/obsolete_statement.js +40 -40
- package/build/src/rules/omit_parameter_name.js +8 -6
- 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 +18 -18
- 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 +2 -2
- package/build/src/rules/slow_parameter_passing.js +2 -2
- 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/unnecessary_pragma.js +14 -14
- package/build/src/rules/unused_methods.js +9 -9
- package/build/src/rules/unused_variables.js +9 -9
- 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 +4 -4
- package/build/src/rules/when_others_last.js +6 -6
- package/package.json +65 -65
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# @abaplint/core
|
|
2
|
-
|
|
3
|
-
[abaplint](https://abaplint.org/) core library
|
|
4
|
-
|
|
5
|
-
Exposes functionality 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 functionality 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
|
@@ -209,6 +209,10 @@ declare class AssignmentServiceToAuthorizationGroup extends AbstractObject {
|
|
|
209
209
|
getDescription(): string | undefined;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
+
declare class AssociationName extends Expression {
|
|
213
|
+
getRunnable(): IStatementRunnable;
|
|
214
|
+
}
|
|
215
|
+
|
|
212
216
|
declare class At implements IStructure {
|
|
213
217
|
getMatcher(): IStructureRunnable;
|
|
214
218
|
}
|
|
@@ -1775,6 +1779,7 @@ declare namespace Expressions {
|
|
|
1775
1779
|
AttributeChain,
|
|
1776
1780
|
AttributeName,
|
|
1777
1781
|
BlockName,
|
|
1782
|
+
AssociationName,
|
|
1778
1783
|
CallTransformationOptions,
|
|
1779
1784
|
CallTransformationParameters,
|
|
1780
1785
|
Cast,
|
|
@@ -2407,6 +2412,10 @@ declare class GetParameter implements IStatement {
|
|
|
2407
2412
|
getMatcher(): IStatementRunnable;
|
|
2408
2413
|
}
|
|
2409
2414
|
|
|
2415
|
+
declare class GetPermissions implements IStatement {
|
|
2416
|
+
getMatcher(): IStatementRunnable;
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2410
2419
|
declare class GetPFStatus implements IStatement {
|
|
2411
2420
|
getMatcher(): IStatementRunnable;
|
|
2412
2421
|
}
|
|
@@ -4693,6 +4702,10 @@ declare class SetLocale implements IStatement {
|
|
|
4693
4702
|
getMatcher(): IStatementRunnable;
|
|
4694
4703
|
}
|
|
4695
4704
|
|
|
4705
|
+
declare class SetLocks implements IStatement {
|
|
4706
|
+
getMatcher(): IStatementRunnable;
|
|
4707
|
+
}
|
|
4708
|
+
|
|
4696
4709
|
declare class SetMargin implements IStatement {
|
|
4697
4710
|
getMatcher(): IStatementRunnable;
|
|
4698
4711
|
}
|
|
@@ -5324,6 +5337,8 @@ declare namespace Statements {
|
|
|
5324
5337
|
Provide_2 as Provide,
|
|
5325
5338
|
EndExec,
|
|
5326
5339
|
SortDataset,
|
|
5340
|
+
GetPermissions,
|
|
5341
|
+
SetLocks,
|
|
5327
5342
|
Enhancement_2 as Enhancement,
|
|
5328
5343
|
EndEnhancement
|
|
5329
5344
|
}
|
|
@@ -69,6 +69,12 @@ class Stream {
|
|
|
69
69
|
nextNextChar() {
|
|
70
70
|
return this.raw.substr(this.offset + 1, 2);
|
|
71
71
|
}
|
|
72
|
+
getRaw() {
|
|
73
|
+
return this.raw;
|
|
74
|
+
}
|
|
75
|
+
getOffset() {
|
|
76
|
+
return this.offset;
|
|
77
|
+
}
|
|
72
78
|
}
|
|
73
79
|
class Lexer {
|
|
74
80
|
static run(file, virtual) {
|
|
@@ -84,10 +90,7 @@ class Lexer {
|
|
|
84
90
|
const col = this.stream.getCol();
|
|
85
91
|
const row = this.stream.getRow();
|
|
86
92
|
let whiteBefore = false;
|
|
87
|
-
|
|
88
|
-
if (s.length === 2) {
|
|
89
|
-
prev = this.stream.prevPrevChar().substr(0, 1);
|
|
90
|
-
}
|
|
93
|
+
const prev = this.stream.getRaw().substr(this.stream.getOffset() - s.length, 1);
|
|
91
94
|
if (prev === " " || prev === "\n" || prev === "\t" || prev === ":") {
|
|
92
95
|
whiteBefore = true;
|
|
93
96
|
}
|
|
@@ -113,13 +116,13 @@ class Lexer {
|
|
|
113
116
|
if (first === "|" && last === "|") {
|
|
114
117
|
tok = new Tokens.StringTemplate(pos, s);
|
|
115
118
|
}
|
|
116
|
-
else if (first === "|" && last === "{") {
|
|
119
|
+
else if (first === "|" && last === "{" && whiteAfter === true) {
|
|
117
120
|
tok = new Tokens.StringTemplateBegin(pos, s);
|
|
118
121
|
}
|
|
119
|
-
else if (first === "}" && last === "|") {
|
|
122
|
+
else if (first === "}" && last === "|" && whiteBefore === true) {
|
|
120
123
|
tok = new Tokens.StringTemplateEnd(pos, s);
|
|
121
124
|
}
|
|
122
|
-
else if (first === "}" && last === "{") {
|
|
125
|
+
else if (first === "}" && last === "{" && whiteAfter === true && whiteBefore === true) {
|
|
123
126
|
tok = new Tokens.StringTemplateMiddle(pos, s);
|
|
124
127
|
}
|
|
125
128
|
else {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AssociationName = void 0;
|
|
4
|
+
const combi_1 = require("../combi");
|
|
5
|
+
class AssociationName extends combi_1.Expression {
|
|
6
|
+
getRunnable() {
|
|
7
|
+
return (0, combi_1.regex)(/^\\_[\w]+$/);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.AssociationName = AssociationName;
|
|
11
|
+
//# sourceMappingURL=association_name.js.map
|
|
@@ -23,6 +23,7 @@ __exportStar(require("./arrow"), exports);
|
|
|
23
23
|
__exportStar(require("./attribute_chain"), exports);
|
|
24
24
|
__exportStar(require("./attribute_name"), exports);
|
|
25
25
|
__exportStar(require("./block_name"), exports);
|
|
26
|
+
__exportStar(require("./association_name"), exports);
|
|
26
27
|
__exportStar(require("./call_transformation_options"), exports);
|
|
27
28
|
__exportStar(require("./call_transformation_parameters"), exports);
|
|
28
29
|
__exportStar(require("./cast"), exports);
|
|
@@ -4,7 +4,7 @@ exports.MethodParamName = void 0;
|
|
|
4
4
|
const combi_1 = require("../combi");
|
|
5
5
|
class MethodParamName extends combi_1.Expression {
|
|
6
6
|
getRunnable() {
|
|
7
|
-
const field = (0, combi_1.regex)(
|
|
7
|
+
const field = (0, combi_1.regex)(/^!?\w*(\/\w+\/)?\w+$/);
|
|
8
8
|
return field;
|
|
9
9
|
}
|
|
10
10
|
}
|
|
@@ -6,7 +6,7 @@ const expressions_1 = require("../expressions");
|
|
|
6
6
|
const version_1 = require("../../../version");
|
|
7
7
|
class CommitEntities {
|
|
8
8
|
getMatcher() {
|
|
9
|
-
const s = (0, combi_1.seq)("COMMIT ENTITIES RESPONSE OF", expressions_1.SimpleName, "FAILED", expressions_1.Target, "REPORTED", expressions_1.Target);
|
|
9
|
+
const s = (0, combi_1.seq)("COMMIT ENTITIES", (0, combi_1.optPrio)("IN SIMULATION MODE"), (0, combi_1.star)((0, combi_1.seq)("RESPONSE OF", expressions_1.SimpleName, "FAILED", expressions_1.Target, "REPORTED", expressions_1.Target)));
|
|
10
10
|
return (0, combi_1.ver)(version_1.Version.v754, s);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -12,10 +12,11 @@ class DeleteInternal {
|
|
|
12
12
|
const fromTo = (0, combi_1.seq)((0, combi_1.optPrio)((0, combi_1.seq)("FROM", expressions_1.Source)), (0, combi_1.optPrio)((0, combi_1.seq)("TO", expressions_1.Source)));
|
|
13
13
|
const where = (0, combi_1.seq)("WHERE", (0, combi_1.alt)(expressions_1.ComponentCond, expressions_1.Dynamic));
|
|
14
14
|
const key = (0, combi_1.seq)("WITH TABLE KEY", (0, combi_1.opt)((0, combi_1.seq)(keyName, "COMPONENTS")), (0, combi_1.plus)(expressions_1.ComponentCompare));
|
|
15
|
-
const table = (0, combi_1.seq)(
|
|
15
|
+
const table = (0, combi_1.seq)("TABLE", expressions_1.Target, (0, combi_1.alt)((0, combi_1.per)(index, using), fromTo, key));
|
|
16
|
+
const other = (0, combi_1.seq)(expressions_1.Target, (0, combi_1.alt)((0, combi_1.per)(index, using), fromTo, key), (0, combi_1.opt)(where));
|
|
16
17
|
const f = (0, combi_1.seq)(expressions_1.FieldSub, (0, combi_1.optPrio)(expressions_1.FieldOffset), (0, combi_1.optPrio)(expressions_1.FieldLength));
|
|
17
18
|
const adjacent = (0, combi_1.seq)("ADJACENT DUPLICATES FROM", expressions_1.Target, (0, combi_1.optPrio)(using), (0, combi_1.opt)((0, combi_1.seq)("COMPARING", (0, combi_1.altPrio)("ALL FIELDS", (0, combi_1.plus)((0, combi_1.altPrio)(f, expressions_1.Dynamic))))), (0, combi_1.optPrio)(using));
|
|
18
|
-
return (0, combi_1.seq)("DELETE", (0, combi_1.alt)(table, adjacent));
|
|
19
|
+
return (0, combi_1.seq)("DELETE", (0, combi_1.alt)(table, adjacent, other));
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
exports.DeleteInternal = DeleteInternal;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPermissions = void 0;
|
|
4
|
+
const combi_1 = require("../combi");
|
|
5
|
+
const expressions_1 = require("../expressions");
|
|
6
|
+
const version_1 = require("../../../version");
|
|
7
|
+
class GetPermissions {
|
|
8
|
+
getMatcher() {
|
|
9
|
+
const s = (0, combi_1.seq)("GET PERMISSIONS ONLY GLOBAL AUTHORIZATION ENTITY", expressions_1.SimpleName, "REQUEST", expressions_1.Source, "RESULT", expressions_1.Target, "FAILED", expressions_1.Target, "REPORTED", expressions_1.Target);
|
|
10
|
+
return (0, combi_1.ver)(version_1.Version.v754, s);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.GetPermissions = GetPermissions;
|
|
14
|
+
//# sourceMappingURL=get_permissions.js.map
|
|
@@ -313,6 +313,8 @@ __exportStar(require("./delete_memory"), exports);
|
|
|
313
313
|
__exportStar(require("./provide"), exports);
|
|
314
314
|
__exportStar(require("./endexec"), exports);
|
|
315
315
|
__exportStar(require("./sort_dataset"), exports);
|
|
316
|
+
__exportStar(require("./get_permissions"), exports);
|
|
317
|
+
__exportStar(require("./set_locks"), exports);
|
|
316
318
|
__exportStar(require("./enhancement"), exports);
|
|
317
319
|
__exportStar(require("./end_enhancement"), exports);
|
|
318
320
|
//# sourceMappingURL=index.js.map
|
|
@@ -6,7 +6,9 @@ const expressions_1 = require("../expressions");
|
|
|
6
6
|
const version_1 = require("../../../version");
|
|
7
7
|
class ModifyEntities {
|
|
8
8
|
getMatcher() {
|
|
9
|
-
const
|
|
9
|
+
const fieldsWith = (0, combi_1.seq)("FIELDS (", (0, combi_1.plus)(expressions_1.SimpleName), ") WITH", expressions_1.Source);
|
|
10
|
+
const operation = (0, combi_1.alt)((0, combi_1.seq)("UPDATE SET FIELDS WITH", expressions_1.Source), (0, combi_1.seq)("UPDATE", fieldsWith), (0, combi_1.seq)("DELETE FROM", expressions_1.Source), (0, combi_1.seq)("EXECUTE", expressions_1.SimpleName, "FROM", expressions_1.Source), (0, combi_1.seq)("CREATE", (0, combi_1.optPrio)("AUTO FILL CID"), fieldsWith));
|
|
11
|
+
const s = (0, combi_1.seq)("MODIFY ENTITIES OF", expressions_1.SimpleName, (0, combi_1.opt)("IN LOCAL MODE"), "ENTITY", expressions_1.SimpleName, operation, (0, combi_1.optPrio)((0, combi_1.seq)("MAPPED", expressions_1.Target)), (0, combi_1.per)((0, combi_1.seq)("FAILED", expressions_1.Target), (0, combi_1.seq)("RESULT", expressions_1.Target), (0, combi_1.seq)("REPORTED", expressions_1.Target)));
|
|
10
12
|
return (0, combi_1.ver)(version_1.Version.v754, s);
|
|
11
13
|
}
|
|
12
14
|
}
|
|
@@ -7,7 +7,7 @@ const version_1 = require("../../../version");
|
|
|
7
7
|
const tokens_1 = require("../../1_lexer/tokens");
|
|
8
8
|
class ReadEntities {
|
|
9
9
|
getMatcher() {
|
|
10
|
-
const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.SimpleName, "IN LOCAL MODE", "ENTITY", expressions_1.SimpleName, "FIELDS", (0, combi_1.tok)(tokens_1.WParenLeftW), expressions_1.SimpleName, (0, combi_1.tok)(tokens_1.WParenRightW), "WITH", expressions_1.Source, "RESULT", expressions_1.Target);
|
|
10
|
+
const s = (0, combi_1.seq)("READ ENTITIES OF", expressions_1.SimpleName, "IN LOCAL MODE", "ENTITY", expressions_1.SimpleName, (0, combi_1.opt)((0, combi_1.seq)("BY", expressions_1.AssociationName)), "FIELDS", (0, combi_1.tok)(tokens_1.WParenLeftW), (0, combi_1.plus)(expressions_1.SimpleName), (0, combi_1.tok)(tokens_1.WParenRightW), "WITH", expressions_1.Source, "RESULT", expressions_1.Target, (0, combi_1.optPrio)((0, combi_1.seq)("LINK", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("FAILED", expressions_1.Target)), (0, combi_1.optPrio)((0, combi_1.seq)("REPORTED", expressions_1.Target)));
|
|
11
11
|
return (0, combi_1.ver)(version_1.Version.v754, s);
|
|
12
12
|
}
|
|
13
13
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SetLocks = void 0;
|
|
4
|
+
const combi_1 = require("../combi");
|
|
5
|
+
const expressions_1 = require("../expressions");
|
|
6
|
+
const version_1 = require("../../../version");
|
|
7
|
+
class SetLocks {
|
|
8
|
+
getMatcher() {
|
|
9
|
+
const s = (0, combi_1.seq)("SET LOCKS OF", expressions_1.SimpleName, "ENTITY", expressions_1.SimpleName, "FROM", expressions_1.Source, "FAILED", expressions_1.Target, "REPORTED", expressions_1.Target);
|
|
10
|
+
return (0, combi_1.ver)(version_1.Version.v754, s);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.SetLocks = SetLocks;
|
|
14
|
+
//# sourceMappingURL=set_locks.js.map
|
|
@@ -9,7 +9,7 @@ class Normal {
|
|
|
9
9
|
getMatcher() {
|
|
10
10
|
// note that the sequence of alternatives here influences performance
|
|
11
11
|
return (0, _combi_1.alt)((0, _combi_1.sta)(Statements.Move), (0, _combi_1.sta)(Statements.Call), (0, _combi_1.sta)(Statements.Data), (0, _combi_1.sub)(Structures.If), (0, _combi_1.sta)(Statements.Clear), (0, _combi_1.sta)(Statements.FieldSymbol), (0, _combi_1.sta)(Statements.CreateObject), (0, _combi_1.sta)(Statements.CallFunction), (0, _combi_1.sta)(_statement_1.MacroCall), (0, _combi_1.sub)(Structures.LoopAtScreen), (0, _combi_1.sub)(Structures.Loop), (0, _combi_1.sta)(Statements.Append), (0, _combi_1.sub)(Structures.Try), (0, _combi_1.sta)(Statements.ReadTable), (0, _combi_1.sta)(Statements.Assert), (0, _combi_1.sta)(Statements.Return), (0, _combi_1.sta)(Statements.Select), (0, _combi_1.sta)(Statements.Assign), (0, _combi_1.sta)(Statements.InsertInternal), (0, _combi_1.sta)(Statements.DeleteInternal), (0, _combi_1.sta)(Statements.Concatenate), (0, _combi_1.sub)(Structures.Case), (0, _combi_1.sub)(Structures.CaseType), (0, _combi_1.sub)(Structures.Enhancement), (0, _combi_1.sub)(Structures.EnhancementSection), (0, _combi_1.sta)(Statements.AddCorresponding), (0, _combi_1.sta)(Statements.Add), (0, _combi_1.sta)(Statements.AssignLocalCopy), (0, _combi_1.sta)(Statements.AuthorityCheck), (0, _combi_1.sta)(Statements.Back), (0, _combi_1.sta)(Statements.Break), (0, _combi_1.sta)(Statements.BreakId), (0, _combi_1.sta)(Statements.CallDatabase), (0, _combi_1.sta)(Statements.CallDialog), (0, _combi_1.sta)(Statements.CallKernel), (0, _combi_1.sta)(Statements.CallOLE), (0, _combi_1.sta)(Statements.CallScreen), (0, _combi_1.sta)(Statements.ModifyScreen), (0, _combi_1.sta)(Statements.CallSelectionScreen), (0, _combi_1.sta)(Statements.CallTransaction), (0, _combi_1.sta)(Statements.CallTransformation), (0, _combi_1.sta)(Statements.Check), (0, _combi_1.sta)(Statements.ClassDefinitionLoad), (0, _combi_1.sta)(Statements.CloseCursor), (0, _combi_1.sta)(Statements.CloseDataset), (0, _combi_1.sta)(Statements.Collect), (0, _combi_1.sta)(Statements.Commit), (0, _combi_1.sta)(Statements.Communication), (0, _combi_1.sta)(Statements.Compute), (0, _combi_1.sta)(Statements.CallBadi), (0, _combi_1.sta)(Statements.Condense), (0, _combi_1.sta)(Statements.Constant), (0, _combi_1.sta)(Statements.Contexts), (0, _combi_1.sta)(Statements.Continue), (0, _combi_1.sta)(Statements.ConvertText), (0, _combi_1.sta)(Statements.Convert), (0, _combi_1.sta)(Statements.CreateData), (0, _combi_1.sta)(Statements.CreateOLE), (0, _combi_1.sta)(Statements.DeleteCluster), (0, _combi_1.sta)(Statements.DeleteDatabase), (0, _combi_1.sta)(Statements.DeleteDataset), (0, _combi_1.sta)(Statements.DeleteDynpro), (0, _combi_1.sta)(Statements.DeleteMemory), (0, _combi_1.sta)(Statements.DeleteReport), (0, _combi_1.sta)(Statements.DeleteTextpool), (0, _combi_1.sta)(Statements.Demand), (0, _combi_1.sta)(Statements.Describe), (0, _combi_1.sta)(Statements.Detail), (0, _combi_1.sta)(Statements.Divide), (0, _combi_1.sta)(Statements.EditorCall), (0, _combi_1.sta)(Statements.EnhancementPoint), (0, _combi_1.sta)(Statements.Exit), (0, _combi_1.sta)(Statements.ExportDynpro), (0, _combi_1.sta)(Statements.Export), (0, _combi_1.sta)(Statements.Extract), (0, _combi_1.sta)(Statements.FetchNextCursor), (0, _combi_1.sta)(Statements.FieldGroup), (0, _combi_1.sta)(Statements.Fields), (0, _combi_1.sta)(Statements.Find), (0, _combi_1.sta)(Statements.Format), (0, _combi_1.sta)(Statements.FreeMemory), (0, _combi_1.sta)(Statements.FreeObject), (0, _combi_1.sta)(Statements.Free), (0, _combi_1.sta)(Statements.GenerateDynpro), (0, _combi_1.sta)(Statements.GenerateReport), (0, _combi_1.sta)(Statements.GenerateSubroutine), (0, _combi_1.sta)(Statements.GetBadi), (0, _combi_1.sta)(Statements.GetBit), (0, _combi_1.sta)(Statements.GetCursor), (0, _combi_1.sta)(Statements.GetDataset), (0, _combi_1.sta)(Statements.GetLocale), (0, _combi_1.sta)(Statements.GetParameter), (0, _combi_1.sta)(Statements.GetPFStatus), (0, _combi_1.sta)(Statements.GetProperty), (0, _combi_1.sta)(Statements.GetReference), (0, _combi_1.sta)(Statements.GetRunTime), (0, _combi_1.sta)(Statements.GetTime), (0, _combi_1.sta)(Statements.Hide), (0, _combi_1.sta)(Statements.Nodes), (0, _combi_1.sta)(Statements.ImportDynpro), (0, _combi_1.sta)(Statements.ImportNametab), (0, _combi_1.sta)(Statements.MoveCorresponding), (0, _combi_1.sta)(Statements.Import), (0, _combi_1.sta)(Statements.Infotypes), (0, _combi_1.sta)(Statements.Include), // include does not have to be at top level
|
|
12
|
-
(0, _combi_1.sta)(Statements.InsertDatabase), (0, _combi_1.sta)(Statements.InsertReport), (0, _combi_1.sta)(Statements.InsertTextpool), (0, _combi_1.sta)(Statements.InsertFieldGroup), (0, _combi_1.sta)(Statements.InterfaceLoad), (0, _combi_1.sta)(Statements.Leave), (0, _combi_1.sta)(Statements.LoadReport), (0, _combi_1.sta)(Statements.Local), (0, _combi_1.sta)(Statements.With), (0, _combi_1.sta)(Statements.LogPoint), (0, _combi_1.sta)(Statements.Message), (0, _combi_1.sta)(Statements.ModifyLine), (0, _combi_1.sta)(Statements.ModifyDatabase), (0, _combi_1.sta)(Statements.ModifyInternal), (0, _combi_1.sta)(Statements.Multiply), (0, _combi_1.sta)(Statements.NewLine), (0, _combi_1.sta)(Statements.NewPage), (0, _combi_1.sta)(Statements.OpenCursor), (0, _combi_1.sta)(Statements.OpenDataset), (0, _combi_1.sta)(Statements.Overlay), (0, _combi_1.sta)(Statements.Pack), (0, _combi_1.sta)(Statements.Perform), (0, _combi_1.sta)(Statements.Position), (0, _combi_1.sta)(Statements.Put), (0, _combi_1.sta)(Statements.PrintControl), (0, _combi_1.sta)(Statements.RaiseEvent), (0, _combi_1.sta)(Statements.Raise), (0, _combi_1.sta)(Statements.Ranges), (0, _combi_1.sta)(Statements.ReadDataset), (0, _combi_1.sta)(Statements.ReadLine), (0, _combi_1.sta)(Statements.ReadReport), (0, _combi_1.sta)(Statements.ReadTextpool), (0, _combi_1.sta)(Statements.Receive), (0, _combi_1.sta)(Statements.RefreshControl), (0, _combi_1.sta)(Statements.Refresh), (0, _combi_1.sta)(Statements.Reject), (0, _combi_1.sta)(Statements.Replace), (0, _combi_1.sta)(Statements.Reserve), (0, _combi_1.sta)(Statements.Resume), (0, _combi_1.sta)(Statements.Retry), (0, _combi_1.sta)(Statements.Rollback), (0, _combi_1.sta)(Statements.Scan), (0, _combi_1.sta)(Statements.ScrollList), (0, _combi_1.sta)(Statements.Search), (0, _combi_1.sta)(Statements.SetBit), (0, _combi_1.sta)(Statements.SetBlank), (0, _combi_1.sta)(Statements.SetCountry), (0, _combi_1.sta)(Statements.SetCursor), (0, _combi_1.sta)(Statements.SetDataset), (0, _combi_1.sta)(Statements.SetExtendedCheck), (0, _combi_1.sta)(Statements.SetHandler), (0, _combi_1.sta)(Statements.SetLanguage), (0, _combi_1.sta)(Statements.SetLeft), (0, _combi_1.sta)(Statements.SetLocale), (0, _combi_1.sta)(Statements.SetMargin), (0, _combi_1.sta)(Statements.SetParameter), (0, _combi_1.sta)(Statements.SetPFStatus), (0, _combi_1.sta)(Statements.SetProperty), (0, _combi_1.sta)(Statements.SetRunTime), (0, _combi_1.sta)(Statements.SetScreen), (0, _combi_1.sta)(Statements.SetTitlebar), (0, _combi_1.sta)(Statements.SetUserCommand), (0, _combi_1.sta)(Statements.SetUpdateTask), (0, _combi_1.sta)(Statements.Shift), (0, _combi_1.sta)(Statements.Skip), (0, _combi_1.sta)(Statements.SortDataset), (0, _combi_1.sta)(Statements.Sort), (0, _combi_1.sta)(Statements.Static), (0, _combi_1.sta)(Statements.Split), (0, _combi_1.sta)(Statements.Stop), (0, _combi_1.sta)(Statements.Submit), (0, _combi_1.sta)(Statements.Summary), (0, _combi_1.sta)(Statements.SubtractCorresponding), (0, _combi_1.sta)(Statements.Subtract), (0, _combi_1.sta)(Statements.SuppressDialog), (0, _combi_1.sta)(Statements.Supply), (0, _combi_1.sta)(Statements.Sum), (0, _combi_1.sta)(Statements.SyntaxCheck), (0, _combi_1.sta)(Statements.SystemCall), (0, _combi_1.sta)(Statements.Tables), (0, _combi_1.sta)(Statements.Transfer), (0, _combi_1.sta)(Statements.Translate), (0, _combi_1.sta)(Statements.Type), (0, _combi_1.sta)(Statements.TypePools), (0, _combi_1.sta)(Statements.Uline), (0, _combi_1.sta)(Statements.Unassign), (0, _combi_1.sta)(Statements.Unpack), (0, _combi_1.sta)(Statements.UpdateDatabase), (0, _combi_1.sta)(Statements.Wait), (0, _combi_1.sta)(Statements.Window), (0, _combi_1.sta)(Statements.Write), (0, _combi_1.sta)(Statements.CommitEntities), (0, _combi_1.sta)(Statements.ModifyEntities), (0, _combi_1.sta)(Statements.ReadEntities), (0, _combi_1.sta)(Statements.RollbackEntities), (0, _combi_1.sub)(Structures.Define), (0, _combi_1.sub)(Structures.TestInjection), (0, _combi_1.sub)(Structures.TestSeam), (0, _combi_1.sub)(Structures.TypeMesh), (0, _combi_1.sub)(Structures.Provide), (0, _combi_1.sub)(Structures.CatchSystemExceptions), (0, _combi_1.sub)(Structures.At), (0, _combi_1.sub)(Structures.Constants), (0, _combi_1.sub)(Structures.Types), (0, _combi_1.sub)(Structures.Statics), (0, _combi_1.sub)(Structures.Select), (0, _combi_1.sub)(Structures.Data), (0, _combi_1.sub)(Structures.TypeEnum), (0, _combi_1.sub)(Structures.While), (0, _combi_1.sub)(Structures.With), (0, _combi_1.sub)(Structures.Do), (0, _combi_1.sub)(Structures.ExecSQL));
|
|
12
|
+
(0, _combi_1.sta)(Statements.InsertDatabase), (0, _combi_1.sta)(Statements.InsertReport), (0, _combi_1.sta)(Statements.InsertTextpool), (0, _combi_1.sta)(Statements.InsertFieldGroup), (0, _combi_1.sta)(Statements.InterfaceLoad), (0, _combi_1.sta)(Statements.Leave), (0, _combi_1.sta)(Statements.LoadReport), (0, _combi_1.sta)(Statements.Local), (0, _combi_1.sta)(Statements.With), (0, _combi_1.sta)(Statements.LogPoint), (0, _combi_1.sta)(Statements.Message), (0, _combi_1.sta)(Statements.ModifyLine), (0, _combi_1.sta)(Statements.ModifyDatabase), (0, _combi_1.sta)(Statements.ModifyInternal), (0, _combi_1.sta)(Statements.Multiply), (0, _combi_1.sta)(Statements.NewLine), (0, _combi_1.sta)(Statements.NewPage), (0, _combi_1.sta)(Statements.OpenCursor), (0, _combi_1.sta)(Statements.OpenDataset), (0, _combi_1.sta)(Statements.Overlay), (0, _combi_1.sta)(Statements.Pack), (0, _combi_1.sta)(Statements.Perform), (0, _combi_1.sta)(Statements.Position), (0, _combi_1.sta)(Statements.Put), (0, _combi_1.sta)(Statements.PrintControl), (0, _combi_1.sta)(Statements.RaiseEvent), (0, _combi_1.sta)(Statements.Raise), (0, _combi_1.sta)(Statements.Ranges), (0, _combi_1.sta)(Statements.ReadDataset), (0, _combi_1.sta)(Statements.ReadLine), (0, _combi_1.sta)(Statements.ReadReport), (0, _combi_1.sta)(Statements.ReadTextpool), (0, _combi_1.sta)(Statements.Receive), (0, _combi_1.sta)(Statements.RefreshControl), (0, _combi_1.sta)(Statements.Refresh), (0, _combi_1.sta)(Statements.Reject), (0, _combi_1.sta)(Statements.Replace), (0, _combi_1.sta)(Statements.Reserve), (0, _combi_1.sta)(Statements.Resume), (0, _combi_1.sta)(Statements.Retry), (0, _combi_1.sta)(Statements.Rollback), (0, _combi_1.sta)(Statements.Scan), (0, _combi_1.sta)(Statements.ScrollList), (0, _combi_1.sta)(Statements.Search), (0, _combi_1.sta)(Statements.SetBit), (0, _combi_1.sta)(Statements.SetBlank), (0, _combi_1.sta)(Statements.SetCountry), (0, _combi_1.sta)(Statements.SetCursor), (0, _combi_1.sta)(Statements.SetDataset), (0, _combi_1.sta)(Statements.SetExtendedCheck), (0, _combi_1.sta)(Statements.SetHandler), (0, _combi_1.sta)(Statements.SetLanguage), (0, _combi_1.sta)(Statements.SetLeft), (0, _combi_1.sta)(Statements.SetLocale), (0, _combi_1.sta)(Statements.SetMargin), (0, _combi_1.sta)(Statements.SetParameter), (0, _combi_1.sta)(Statements.SetPFStatus), (0, _combi_1.sta)(Statements.SetProperty), (0, _combi_1.sta)(Statements.SetRunTime), (0, _combi_1.sta)(Statements.SetScreen), (0, _combi_1.sta)(Statements.SetTitlebar), (0, _combi_1.sta)(Statements.SetUserCommand), (0, _combi_1.sta)(Statements.SetUpdateTask), (0, _combi_1.sta)(Statements.Shift), (0, _combi_1.sta)(Statements.Skip), (0, _combi_1.sta)(Statements.SortDataset), (0, _combi_1.sta)(Statements.Sort), (0, _combi_1.sta)(Statements.Static), (0, _combi_1.sta)(Statements.Split), (0, _combi_1.sta)(Statements.Stop), (0, _combi_1.sta)(Statements.Submit), (0, _combi_1.sta)(Statements.Summary), (0, _combi_1.sta)(Statements.SubtractCorresponding), (0, _combi_1.sta)(Statements.Subtract), (0, _combi_1.sta)(Statements.SuppressDialog), (0, _combi_1.sta)(Statements.Supply), (0, _combi_1.sta)(Statements.Sum), (0, _combi_1.sta)(Statements.SyntaxCheck), (0, _combi_1.sta)(Statements.SystemCall), (0, _combi_1.sta)(Statements.Tables), (0, _combi_1.sta)(Statements.Transfer), (0, _combi_1.sta)(Statements.Translate), (0, _combi_1.sta)(Statements.Type), (0, _combi_1.sta)(Statements.TypePools), (0, _combi_1.sta)(Statements.Uline), (0, _combi_1.sta)(Statements.Unassign), (0, _combi_1.sta)(Statements.Unpack), (0, _combi_1.sta)(Statements.UpdateDatabase), (0, _combi_1.sta)(Statements.Wait), (0, _combi_1.sta)(Statements.Window), (0, _combi_1.sta)(Statements.Write), (0, _combi_1.sta)(Statements.CommitEntities), (0, _combi_1.sta)(Statements.GetPermissions), (0, _combi_1.sta)(Statements.SetLocks), (0, _combi_1.sta)(Statements.ModifyEntities), (0, _combi_1.sta)(Statements.ReadEntities), (0, _combi_1.sta)(Statements.RollbackEntities), (0, _combi_1.sub)(Structures.Define), (0, _combi_1.sub)(Structures.TestInjection), (0, _combi_1.sub)(Structures.TestSeam), (0, _combi_1.sub)(Structures.TypeMesh), (0, _combi_1.sub)(Structures.Provide), (0, _combi_1.sub)(Structures.CatchSystemExceptions), (0, _combi_1.sub)(Structures.At), (0, _combi_1.sub)(Structures.Constants), (0, _combi_1.sub)(Structures.Types), (0, _combi_1.sub)(Structures.Statics), (0, _combi_1.sub)(Structures.Select), (0, _combi_1.sub)(Structures.Data), (0, _combi_1.sub)(Structures.TypeEnum), (0, _combi_1.sub)(Structures.While), (0, _combi_1.sub)(Structures.With), (0, _combi_1.sub)(Structures.Do), (0, _combi_1.sub)(Structures.ExecSQL));
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
exports.Normal = Normal;
|
|
@@ -138,7 +138,7 @@ class BuiltIn {
|
|
|
138
138
|
ret.push(this.buildConstant("space", new basic_1.CharacterType(1), "' '"));
|
|
139
139
|
for (const e of extras) {
|
|
140
140
|
const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), e);
|
|
141
|
-
ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(e), ["read_only" /* ReadOnly */, "built-in" /* BuiltIn */], "'?'"));
|
|
141
|
+
ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(e), ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */], "'?'"));
|
|
142
142
|
}
|
|
143
143
|
return ret;
|
|
144
144
|
}
|
|
@@ -234,9 +234,9 @@ class BuiltIn {
|
|
|
234
234
|
components.push({ name: "zonlo", type: new basic_1.CharacterType(6, "sy-zonlo") });
|
|
235
235
|
const type = new basic_1.StructureType(components);
|
|
236
236
|
const id1 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "sy");
|
|
237
|
-
const sy = new _typed_identifier_1.TypedIdentifier(id1, BuiltIn.filename, type, ["read_only" /* ReadOnly */, "built-in" /* BuiltIn */]);
|
|
237
|
+
const sy = new _typed_identifier_1.TypedIdentifier(id1, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]);
|
|
238
238
|
const id2 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "syst");
|
|
239
|
-
const syst = new _typed_identifier_1.TypedIdentifier(id2, BuiltIn.filename, type, ["read_only" /* ReadOnly */, "built-in" /* BuiltIn */]);
|
|
239
|
+
const syst = new _typed_identifier_1.TypedIdentifier(id2, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]);
|
|
240
240
|
return [sy, syst];
|
|
241
241
|
}
|
|
242
242
|
buildConstant(name, type, value) {
|
|
@@ -247,11 +247,11 @@ class BuiltIn {
|
|
|
247
247
|
if (value === undefined) {
|
|
248
248
|
value = "'?'";
|
|
249
249
|
}
|
|
250
|
-
return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, type, ["read_only" /* ReadOnly */, "built-in" /* BuiltIn */], value);
|
|
250
|
+
return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */], value);
|
|
251
251
|
}
|
|
252
252
|
buildVariable(name) {
|
|
253
253
|
const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name);
|
|
254
|
-
return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), ["built-in" /* BuiltIn */]);
|
|
254
|
+
return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), ["built-in" /* IdentifierMeta.BuiltIn */]);
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
exports.BuiltIn = BuiltIn;
|
|
@@ -22,18 +22,18 @@ class FormParam {
|
|
|
22
22
|
else {
|
|
23
23
|
type = new basic_1.UnknownType("todo, FORM STRUCTURES typing");
|
|
24
24
|
}
|
|
25
|
-
return new _typed_identifier_1.TypedIdentifier(nameToken, filename, type, ["form_parameter" /* FormParameter */]);
|
|
25
|
+
return new _typed_identifier_1.TypedIdentifier(nameToken, filename, type, ["form_parameter" /* IdentifierMeta.FormParameter */]);
|
|
26
26
|
}
|
|
27
27
|
if (node.getChildren().length === 1 && nameToken) {
|
|
28
28
|
// untyped FORM parameter
|
|
29
|
-
return new _typed_identifier_1.TypedIdentifier(nameToken, filename, new basic_1.AnyType(), ["form_parameter" /* FormParameter */]);
|
|
29
|
+
return new _typed_identifier_1.TypedIdentifier(nameToken, filename, new basic_1.AnyType(), ["form_parameter" /* IdentifierMeta.FormParameter */]);
|
|
30
30
|
}
|
|
31
31
|
const bfound = new basic_types_1.BasicTypes(filename, scope).parseType(node);
|
|
32
32
|
if (nameToken && bfound) {
|
|
33
|
-
return new _typed_identifier_1.TypedIdentifier(nameToken, filename, bfound, ["form_parameter" /* FormParameter */]);
|
|
33
|
+
return new _typed_identifier_1.TypedIdentifier(nameToken, filename, bfound, ["form_parameter" /* IdentifierMeta.FormParameter */]);
|
|
34
34
|
}
|
|
35
35
|
if (nameToken) {
|
|
36
|
-
return new _typed_identifier_1.TypedIdentifier(nameToken, filename, new basic_1.UnknownType("FormParam, todo"), ["form_parameter" /* FormParameter */]);
|
|
36
|
+
return new _typed_identifier_1.TypedIdentifier(nameToken, filename, new basic_1.UnknownType("FormParam, todo"), ["form_parameter" /* IdentifierMeta.FormParameter */]);
|
|
37
37
|
}
|
|
38
38
|
throw new Error("FormParam, unexpected node");
|
|
39
39
|
}
|
|
@@ -10,13 +10,13 @@ class InlineData {
|
|
|
10
10
|
var _a;
|
|
11
11
|
const token = (_a = node.findFirstExpression(Expressions.TargetField)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
12
12
|
if (token && type) {
|
|
13
|
-
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, type, ["inline" /* InlineDefinition */]);
|
|
13
|
+
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, type, ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
14
14
|
scope.addIdentifier(identifier);
|
|
15
15
|
scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
|
|
16
16
|
}
|
|
17
17
|
else if (token) {
|
|
18
18
|
const message = "InlineData, could not determine type for \"" + token.getStr() + "\"";
|
|
19
|
-
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.UnknownType(message), ["inline" /* InlineDefinition */]);
|
|
19
|
+
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.UnknownType(message), ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
20
20
|
scope.addIdentifier(identifier);
|
|
21
21
|
scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
|
|
22
22
|
}
|
|
@@ -30,7 +30,7 @@ class InlineFieldDefinition {
|
|
|
30
30
|
if (scope.findVariable(name) !== undefined) {
|
|
31
31
|
throw new Error(`Variable ${name} already defined`);
|
|
32
32
|
}
|
|
33
|
-
const identifier = new _typed_identifier_1.TypedIdentifier(field, filename, type, ["inline" /* InlineDefinition */]);
|
|
33
|
+
const identifier = new _typed_identifier_1.TypedIdentifier(field, filename, type, ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
34
34
|
scope.addReference(field, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
|
|
35
35
|
scope.addIdentifier(identifier);
|
|
36
36
|
}
|
|
@@ -10,13 +10,13 @@ class InlineFS {
|
|
|
10
10
|
var _a;
|
|
11
11
|
const token = (_a = node.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
12
12
|
if (token && type) {
|
|
13
|
-
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, type, ["inline" /* InlineDefinition */]);
|
|
13
|
+
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, type, ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
14
14
|
scope.addIdentifier(identifier);
|
|
15
15
|
scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
|
|
16
16
|
}
|
|
17
17
|
else if (token) {
|
|
18
18
|
const message = "InlineFS, could not determine type for \"" + token.getStr() + "\"";
|
|
19
|
-
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.UnknownType(message), ["inline" /* InlineDefinition */]);
|
|
19
|
+
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.UnknownType(message), ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
20
20
|
scope.addIdentifier(identifier);
|
|
21
21
|
scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
|
|
22
22
|
}
|
|
@@ -31,14 +31,14 @@ class InlineLoopDefinition {
|
|
|
31
31
|
if (rowType === undefined) {
|
|
32
32
|
throw new Error("InlineLoopDefinition, not a table type");
|
|
33
33
|
}
|
|
34
|
-
const identifier = new _typed_identifier_1.TypedIdentifier(target.getFirstToken(), filename, rowType, ["inline" /* InlineDefinition */]);
|
|
34
|
+
const identifier = new _typed_identifier_1.TypedIdentifier(target.getFirstToken(), filename, rowType, ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
35
35
|
scope.addReference(target.getFirstToken(), identifier, _reference_1.ReferenceType.DataWriteReference, filename);
|
|
36
36
|
scope.addReference(target.getFirstToken(), identifier, _reference_1.ReferenceType.DataReadReference, filename);
|
|
37
37
|
scope.addIdentifier(identifier);
|
|
38
38
|
}
|
|
39
39
|
const index = node.findExpressionAfterToken("INTO");
|
|
40
40
|
if (index && index.get() instanceof Expressions.TargetField) {
|
|
41
|
-
const identifier = new _typed_identifier_1.TypedIdentifier(index.getFirstToken(), filename, new basic_1.IntegerType(), ["inline" /* InlineDefinition */]);
|
|
41
|
+
const identifier = new _typed_identifier_1.TypedIdentifier(index.getFirstToken(), filename, new basic_1.IntegerType(), ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
42
42
|
scope.addReference(index.getFirstToken(), identifier, _reference_1.ReferenceType.DataWriteReference, filename);
|
|
43
43
|
scope.addIdentifier(identifier);
|
|
44
44
|
}
|
|
@@ -36,18 +36,18 @@ class Catch {
|
|
|
36
36
|
const token = (_b = target.findFirstExpression(Expressions.TargetField)) === null || _b === void 0 ? void 0 : _b.getFirstToken();
|
|
37
37
|
const found = scope.existsObject(firstClassName);
|
|
38
38
|
if (token && found.found === true && firstClassName && found.id) {
|
|
39
|
-
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.ObjectReferenceType(found.id), ["inline" /* InlineDefinition */]);
|
|
39
|
+
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.ObjectReferenceType(found.id), ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
40
40
|
scope.addIdentifier(identifier);
|
|
41
41
|
scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
|
|
42
42
|
}
|
|
43
43
|
else if (token && scope.getDDIC().inErrorNamespace(firstClassName) === false) {
|
|
44
|
-
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.VoidType(firstClassName), ["inline" /* InlineDefinition */]);
|
|
44
|
+
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new basic_1.VoidType(firstClassName), ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
45
45
|
scope.addIdentifier(identifier);
|
|
46
46
|
scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
|
|
47
47
|
}
|
|
48
48
|
else if (token) {
|
|
49
49
|
const message = "Catch, could not determine type for \"" + token.getStr() + "\"";
|
|
50
|
-
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new unknown_type_1.UnknownType(message), ["inline" /* InlineDefinition */]);
|
|
50
|
+
const identifier = new _typed_identifier_1.TypedIdentifier(token, filename, new unknown_type_1.UnknownType(message), ["inline" /* IdentifierMeta.InlineDefinition */]);
|
|
51
51
|
scope.addIdentifier(identifier);
|
|
52
52
|
scope.addReference(token, identifier, _reference_1.ReferenceType.DataWriteReference, filename);
|
|
53
53
|
}
|
|
@@ -14,7 +14,7 @@ class ClassData {
|
|
|
14
14
|
return undefined;
|
|
15
15
|
}
|
|
16
16
|
const meta = found.getMeta().slice();
|
|
17
|
-
meta.push("static" /* Static */);
|
|
17
|
+
meta.push("static" /* IdentifierMeta.Static */);
|
|
18
18
|
return new _typed_identifier_1.TypedIdentifier(found.getToken(), filename, found.getType(), meta);
|
|
19
19
|
}
|
|
20
20
|
const fallback = node.findFirstExpression(Expressions.NamespaceSimpleName);
|
|
@@ -11,7 +11,7 @@ class Constant {
|
|
|
11
11
|
const found = basic.simpleType(node);
|
|
12
12
|
if (found) {
|
|
13
13
|
const val = basic.findValue(node);
|
|
14
|
-
const meta = ["read_only" /* ReadOnly */, "static" /* Static */];
|
|
14
|
+
const meta = ["read_only" /* IdentifierMeta.ReadOnly */, "static" /* IdentifierMeta.Static */];
|
|
15
15
|
return new _typed_identifier_1.TypedIdentifier(found.getToken(), filename, found.getType(), meta, val);
|
|
16
16
|
}
|
|
17
17
|
const fallback = node.findFirstExpression(Expressions.DefinitionName);
|
|
@@ -18,10 +18,10 @@ class SelectionScreen {
|
|
|
18
18
|
{ name: "DYNNR", type: new basic_1.CharacterType(4) },
|
|
19
19
|
{ name: "ACTIVETAB", type: new basic_1.CharacterType(132) },
|
|
20
20
|
]);
|
|
21
|
-
scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(name, filename, type, ["selection_screen_tab" /* SelectionScreenTab */]));
|
|
21
|
+
scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(name, filename, type, ["selection_screen_tab" /* IdentifierMeta.SelectionScreenTab */]));
|
|
22
22
|
}
|
|
23
23
|
else if (concat.startsWith("SELECTION-SCREEN TAB")) {
|
|
24
|
-
scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(name, filename, new basic_1.CharacterType(83), ["selection_screen_tab" /* SelectionScreenTab */]));
|
|
24
|
+
scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(name, filename, new basic_1.CharacterType(83), ["selection_screen_tab" /* IdentifierMeta.SelectionScreenTab */]));
|
|
25
25
|
}
|
|
26
26
|
else {
|
|
27
27
|
scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(name, filename, new basic_1.CharacterType(83)));
|
|
@@ -21,7 +21,7 @@ class ClassData {
|
|
|
21
21
|
}
|
|
22
22
|
// todo, nested structures and INCLUDES
|
|
23
23
|
}
|
|
24
|
-
return new _typed_identifier_1.TypedIdentifier(name, filename, new Basic.StructureType(components), ["static" /* Static */]);
|
|
24
|
+
return new _typed_identifier_1.TypedIdentifier(name, filename, new Basic.StructureType(components), ["static" /* IdentifierMeta.Static */]);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
exports.ClassData = ClassData;
|
|
@@ -37,7 +37,7 @@ class Constants {
|
|
|
37
37
|
if (components.length === 0) {
|
|
38
38
|
return { type: undefined, values };
|
|
39
39
|
}
|
|
40
|
-
const type = new _typed_identifier_1.TypedIdentifier(name, filename, new Basic.StructureType(components), ["read_only" /* ReadOnly */, "static" /* Static */]);
|
|
40
|
+
const type = new _typed_identifier_1.TypedIdentifier(name, filename, new Basic.StructureType(components), ["read_only" /* IdentifierMeta.ReadOnly */, "static" /* IdentifierMeta.Static */]);
|
|
41
41
|
return { type, values };
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -54,7 +54,7 @@ class TypeEnum {
|
|
|
54
54
|
|| scope.getType() === _scope_type_1.ScopeType.Interface) {
|
|
55
55
|
qualifiedName = scope.getName() + "=>" + qualifiedName;
|
|
56
56
|
}
|
|
57
|
-
const id = new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new enum_type_1.EnumType(qualifiedName), ["enum" /* Enum */]);
|
|
57
|
+
const id = new _typed_identifier_1.TypedIdentifier(name.getFirstToken(), filename, new enum_type_1.EnumType(qualifiedName), ["enum" /* IdentifierMeta.Enum */]);
|
|
58
58
|
scope.addType(id);
|
|
59
59
|
types.push(id);
|
|
60
60
|
}
|
|
@@ -68,7 +68,7 @@ class TypeEnum {
|
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
values = [];
|
|
71
|
-
const id = new _typed_identifier_1.TypedIdentifier(stru.getFirstToken(), filename, new basic_1.StructureType(components), ["enum" /* Enum */]);
|
|
71
|
+
const id = new _typed_identifier_1.TypedIdentifier(stru.getFirstToken(), filename, new basic_1.StructureType(components), ["enum" /* IdentifierMeta.Enum */]);
|
|
72
72
|
values.push(id);
|
|
73
73
|
}
|
|
74
74
|
return { values, types };
|
|
@@ -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) {
|
|
@@ -4,7 +4,7 @@ exports.ClassConstant = void 0;
|
|
|
4
4
|
const _typed_identifier_1 = require("./_typed_identifier");
|
|
5
5
|
class ClassConstant extends _typed_identifier_1.TypedIdentifier {
|
|
6
6
|
constructor(id, visibility, value) {
|
|
7
|
-
super(id.getToken(), id.getFilename(), id.getType(), ["read_only" /* ReadOnly */, "static" /* Static */], value);
|
|
7
|
+
super(id.getToken(), id.getFilename(), id.getType(), ["read_only" /* IdentifierMeta.ReadOnly */, "static" /* IdentifierMeta.Static */], value);
|
|
8
8
|
this.visibility = visibility;
|
|
9
9
|
}
|
|
10
10
|
getVisibility() {
|
|
@@ -42,7 +42,7 @@ class FormDefinition extends _identifier_1.Identifier {
|
|
|
42
42
|
for (const param of tables.findAllExpressions(Expressions.FormParam)) {
|
|
43
43
|
if (param.getChildren().length === 1) {
|
|
44
44
|
// untyped TABLES parameter
|
|
45
|
-
ret.push(new _typed_identifier_1.TypedIdentifier(param.getFirstToken(), filename, new basic_1.VoidType("FORM:UNTYPED"), ["form_parameter" /* FormParameter */]));
|
|
45
|
+
ret.push(new _typed_identifier_1.TypedIdentifier(param.getFirstToken(), filename, new basic_1.VoidType("FORM:UNTYPED"), ["form_parameter" /* IdentifierMeta.FormParameter */]));
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
48
|
const p = new form_param_1.FormParam().runSyntax(param, scope, this.filename);
|
|
@@ -57,7 +57,7 @@ class FormDefinition extends _identifier_1.Identifier {
|
|
|
57
57
|
else if (!(type instanceof basic_1.UnknownType) && !(type instanceof basic_1.VoidType)) {
|
|
58
58
|
type = new basic_1.UnknownType("FORM TABLES type must be table type");
|
|
59
59
|
}
|
|
60
|
-
ret.push(new _typed_identifier_1.TypedIdentifier(p.getToken(), filename, type, ["form_parameter" /* FormParameter */]));
|
|
60
|
+
ret.push(new _typed_identifier_1.TypedIdentifier(p.getToken(), filename, type, ["form_parameter" /* IdentifierMeta.FormParameter */]));
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
return ret;
|
|
@@ -119,41 +119,41 @@ class MethodParameters {
|
|
|
119
119
|
const search = token.getStr().toUpperCase().replace("!", "");
|
|
120
120
|
this.optional.push(search); // all parameters optional for event handlers
|
|
121
121
|
if (search === "SENDER" && def) {
|
|
122
|
-
this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, new basic_1.ObjectReferenceType(def), ["event_parameter" /* EventParameter */]));
|
|
122
|
+
this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, new basic_1.ObjectReferenceType(def), ["event_parameter" /* IdentifierMeta.EventParameter */]));
|
|
123
123
|
continue;
|
|
124
124
|
}
|
|
125
125
|
const found = event === null || event === void 0 ? void 0 : event.getParameters().find(p => p.getName().toUpperCase() === search);
|
|
126
126
|
if (found) {
|
|
127
|
-
this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, found.getType(), ["event_parameter" /* EventParameter */]));
|
|
127
|
+
this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, found.getType(), ["event_parameter" /* IdentifierMeta.EventParameter */]));
|
|
128
128
|
}
|
|
129
129
|
else if (doVoid) {
|
|
130
|
-
this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, new basic_1.VoidType(ooName), ["event_parameter" /* EventParameter */]));
|
|
130
|
+
this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, new basic_1.VoidType(ooName), ["event_parameter" /* IdentifierMeta.EventParameter */]));
|
|
131
131
|
}
|
|
132
132
|
else {
|
|
133
133
|
const type = new basic_1.UnknownType(`handler parameter not found "${search}"`);
|
|
134
|
-
this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, type, ["event_parameter" /* EventParameter */]));
|
|
134
|
+
this.importing.push(new _typed_identifier_1.TypedIdentifier(token, this.filename, type, ["event_parameter" /* IdentifierMeta.EventParameter */]));
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
return;
|
|
138
138
|
}
|
|
139
139
|
const importing = node.findFirstExpression(Expressions.MethodDefImporting);
|
|
140
140
|
if (importing) {
|
|
141
|
-
this.add(this.importing, importing, scope, ["importing" /* MethodImporting */]);
|
|
141
|
+
this.add(this.importing, importing, scope, ["importing" /* IdentifierMeta.MethodImporting */]);
|
|
142
142
|
if (importing.concatTokens().toUpperCase().includes(" PREFERRED PARAMETER")) {
|
|
143
143
|
this.preferred = importing.getLastToken().getStr().toUpperCase();
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
const exporting = node.findFirstExpression(Expressions.MethodDefExporting);
|
|
147
147
|
if (exporting) {
|
|
148
|
-
this.add(this.exporting, exporting, scope, ["exporting" /* MethodExporting */]);
|
|
148
|
+
this.add(this.exporting, exporting, scope, ["exporting" /* IdentifierMeta.MethodExporting */]);
|
|
149
149
|
}
|
|
150
150
|
const changing = node.findFirstExpression(Expressions.MethodDefChanging);
|
|
151
151
|
if (changing) {
|
|
152
|
-
this.add(this.changing, changing, scope, ["changing" /* MethodChanging */]);
|
|
152
|
+
this.add(this.changing, changing, scope, ["changing" /* IdentifierMeta.MethodChanging */]);
|
|
153
153
|
}
|
|
154
154
|
const returning = node.findFirstExpression(Expressions.MethodDefReturning);
|
|
155
155
|
if (returning) {
|
|
156
|
-
this.returning = new method_def_returning_1.MethodDefReturning().runSyntax(returning, scope, this.filename, ["returning" /* MethodReturning */]);
|
|
156
|
+
this.returning = new method_def_returning_1.MethodDefReturning().runSyntax(returning, scope, this.filename, ["returning" /* IdentifierMeta.MethodReturning */]);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
add(target, source, scope, meta) {
|
|
@@ -165,10 +165,10 @@ class MethodParameters {
|
|
|
165
165
|
}
|
|
166
166
|
const extraMeta = [];
|
|
167
167
|
if (opt.concatTokens().toUpperCase().startsWith("VALUE(")) {
|
|
168
|
-
extraMeta.push("pass_by_value" /* PassByValue */);
|
|
168
|
+
extraMeta.push("pass_by_value" /* IdentifierMeta.PassByValue */);
|
|
169
169
|
}
|
|
170
|
-
else if (meta.includes("importing" /* MethodImporting */)) {
|
|
171
|
-
extraMeta.push("read_only" /* ReadOnly */);
|
|
170
|
+
else if (meta.includes("importing" /* IdentifierMeta.MethodImporting */)) {
|
|
171
|
+
extraMeta.push("read_only" /* IdentifierMeta.ReadOnly */);
|
|
172
172
|
}
|
|
173
173
|
target.push(new method_param_1.MethodParam().runSyntax(p, scope, this.filename, [...meta, ...extraMeta]));
|
|
174
174
|
if (opt.getLastToken().getStr().toUpperCase() === "OPTIONAL") {
|