@abaplint/core 2.90.7 → 2.90.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/abaplint.d.ts +17 -0
- 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/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 +21 -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/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/objects/table.js +22 -0
- package/build/src/registry.js +1 -1
- package/build/src/rules/downport.js +17 -2
- package/build/src/rules/exit_or_check.js +1 -0
- package/build/src/rules/omit_parameter_name.js +5 -3
- package/build/src/rules/prefer_inline.js +2 -2
- package/build/src/rules/slow_parameter_passing.js +1 -1
- package/build/src/rules/unused_variables.js +3 -3
- package/package.json +6 -6
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
|
}
|
|
@@ -410,6 +414,7 @@ export declare class BuiltIn {
|
|
|
410
414
|
private row;
|
|
411
415
|
private buildDefinition;
|
|
412
416
|
searchBuiltin(name: string | undefined): IMethodDefinition | undefined;
|
|
417
|
+
isPredicate(name: string | undefined): boolean | undefined;
|
|
413
418
|
getTypes(): TypedIdentifier[];
|
|
414
419
|
get(extras: string[]): TypedIdentifier[];
|
|
415
420
|
private buildSY;
|
|
@@ -1775,6 +1780,7 @@ declare namespace Expressions {
|
|
|
1775
1780
|
AttributeChain,
|
|
1776
1781
|
AttributeName,
|
|
1777
1782
|
BlockName,
|
|
1783
|
+
AssociationName,
|
|
1778
1784
|
CallTransformationOptions,
|
|
1779
1785
|
CallTransformationParameters,
|
|
1780
1786
|
Cast,
|
|
@@ -2407,6 +2413,10 @@ declare class GetParameter implements IStatement {
|
|
|
2407
2413
|
getMatcher(): IStatementRunnable;
|
|
2408
2414
|
}
|
|
2409
2415
|
|
|
2416
|
+
declare class GetPermissions implements IStatement {
|
|
2417
|
+
getMatcher(): IStatementRunnable;
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2410
2420
|
declare class GetPFStatus implements IStatement {
|
|
2411
2421
|
getMatcher(): IStatementRunnable;
|
|
2412
2422
|
}
|
|
@@ -2534,6 +2544,7 @@ declare interface IBuiltinMethod {
|
|
|
2534
2544
|
[key: string]: AbstractType;
|
|
2535
2545
|
};
|
|
2536
2546
|
version?: Version;
|
|
2547
|
+
predicate?: boolean;
|
|
2537
2548
|
return: AbstractType;
|
|
2538
2549
|
}
|
|
2539
2550
|
|
|
@@ -4693,6 +4704,10 @@ declare class SetLocale implements IStatement {
|
|
|
4693
4704
|
getMatcher(): IStatementRunnable;
|
|
4694
4705
|
}
|
|
4695
4706
|
|
|
4707
|
+
declare class SetLocks implements IStatement {
|
|
4708
|
+
getMatcher(): IStatementRunnable;
|
|
4709
|
+
}
|
|
4710
|
+
|
|
4696
4711
|
declare class SetMargin implements IStatement {
|
|
4697
4712
|
getMatcher(): IStatementRunnable;
|
|
4698
4713
|
}
|
|
@@ -5324,6 +5339,8 @@ declare namespace Statements {
|
|
|
5324
5339
|
Provide_2 as Provide,
|
|
5325
5340
|
EndExec,
|
|
5326
5341
|
SortDataset,
|
|
5342
|
+
GetPermissions,
|
|
5343
|
+
SetLocks,
|
|
5327
5344
|
Enhancement_2 as Enhancement,
|
|
5328
5345
|
EndEnhancement
|
|
5329
5346
|
}
|
|
@@ -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);
|
|
@@ -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;
|
|
@@ -103,6 +103,17 @@ class BuiltIn {
|
|
|
103
103
|
}
|
|
104
104
|
return this.buildDefinition(BuiltIn.methods[index], index);
|
|
105
105
|
}
|
|
106
|
+
isPredicate(name) {
|
|
107
|
+
if (name === undefined) {
|
|
108
|
+
return undefined;
|
|
109
|
+
}
|
|
110
|
+
// todo, optimize, use hash map
|
|
111
|
+
const index = BuiltIn.methods.findIndex(a => a.name === name.toUpperCase());
|
|
112
|
+
if (index < 0) {
|
|
113
|
+
return undefined;
|
|
114
|
+
}
|
|
115
|
+
return BuiltIn.methods[index].predicate;
|
|
116
|
+
}
|
|
106
117
|
getTypes() {
|
|
107
118
|
const ret = this.buildSY();
|
|
108
119
|
const id = new tokens_1.Identifier(new position_1.Position(1, 1), "abap_bool");
|
|
@@ -138,7 +149,7 @@ class BuiltIn {
|
|
|
138
149
|
ret.push(this.buildConstant("space", new basic_1.CharacterType(1), "' '"));
|
|
139
150
|
for (const e of extras) {
|
|
140
151
|
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 */], "'?'"));
|
|
152
|
+
ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(e), ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */], "'?'"));
|
|
142
153
|
}
|
|
143
154
|
return ret;
|
|
144
155
|
}
|
|
@@ -234,9 +245,9 @@ class BuiltIn {
|
|
|
234
245
|
components.push({ name: "zonlo", type: new basic_1.CharacterType(6, "sy-zonlo") });
|
|
235
246
|
const type = new basic_1.StructureType(components);
|
|
236
247
|
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 */]);
|
|
248
|
+
const sy = new _typed_identifier_1.TypedIdentifier(id1, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]);
|
|
238
249
|
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 */]);
|
|
250
|
+
const syst = new _typed_identifier_1.TypedIdentifier(id2, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]);
|
|
240
251
|
return [sy, syst];
|
|
241
252
|
}
|
|
242
253
|
buildConstant(name, type, value) {
|
|
@@ -247,11 +258,11 @@ class BuiltIn {
|
|
|
247
258
|
if (value === undefined) {
|
|
248
259
|
value = "'?'";
|
|
249
260
|
}
|
|
250
|
-
return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, type, ["read_only" /* ReadOnly */, "built-in" /* BuiltIn */], value);
|
|
261
|
+
return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */], value);
|
|
251
262
|
}
|
|
252
263
|
buildVariable(name) {
|
|
253
264
|
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 */]);
|
|
265
|
+
return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.VoidType(name), ["built-in" /* IdentifierMeta.BuiltIn */]);
|
|
255
266
|
}
|
|
256
267
|
}
|
|
257
268
|
exports.BuiltIn = BuiltIn;
|
|
@@ -415,6 +426,7 @@ BuiltIn.methods = [
|
|
|
415
426
|
"occ": new basic_1.IntegerType(),
|
|
416
427
|
},
|
|
417
428
|
return: new basic_1.CharacterType(1),
|
|
429
|
+
predicate: true,
|
|
418
430
|
version: version_1.Version.v702,
|
|
419
431
|
},
|
|
420
432
|
{
|
|
@@ -430,6 +442,7 @@ BuiltIn.methods = [
|
|
|
430
442
|
"len": new basic_1.IntegerType(),
|
|
431
443
|
"occ": new basic_1.IntegerType(),
|
|
432
444
|
},
|
|
445
|
+
predicate: true,
|
|
433
446
|
return: new basic_1.CharacterType(1), version: version_1.Version.v702,
|
|
434
447
|
},
|
|
435
448
|
{
|
|
@@ -446,6 +459,7 @@ BuiltIn.methods = [
|
|
|
446
459
|
"occ": new basic_1.IntegerType(),
|
|
447
460
|
},
|
|
448
461
|
return: new basic_1.CharacterType(1),
|
|
462
|
+
predicate: true,
|
|
449
463
|
version: version_1.Version.v702,
|
|
450
464
|
},
|
|
451
465
|
{
|
|
@@ -656,6 +670,7 @@ BuiltIn.methods = [
|
|
|
656
670
|
"val": new basic_1.AnyType(),
|
|
657
671
|
},
|
|
658
672
|
return: new basic_1.CharacterType(1),
|
|
673
|
+
predicate: true,
|
|
659
674
|
version: version_1.Version.v740sp02,
|
|
660
675
|
},
|
|
661
676
|
{
|
|
@@ -713,6 +728,7 @@ BuiltIn.methods = [
|
|
|
713
728
|
"len": new basic_1.IntegerType(),
|
|
714
729
|
},
|
|
715
730
|
return: new basic_1.CharacterType(1),
|
|
731
|
+
predicate: true,
|
|
716
732
|
version: version_1.Version.v702,
|
|
717
733
|
},
|
|
718
734
|
{
|
|
@@ -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 };
|
|
@@ -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") {
|
package/build/src/lsp/_lookup.js
CHANGED
|
@@ -63,7 +63,7 @@ class LSPLookup {
|
|
|
63
63
|
if (variable !== undefined && variable.getStart().equals(cursor.token.getStart())) {
|
|
64
64
|
const hover = "Variable Definition\n\n" + this.dumpType(variable);
|
|
65
65
|
let location = undefined;
|
|
66
|
-
if (variable.getMeta().includes("built-in" /* BuiltIn */) === false) {
|
|
66
|
+
if (variable.getMeta().includes("built-in" /* IdentifierMeta.BuiltIn */) === false) {
|
|
67
67
|
location = _lsp_utils_1.LSPUtils.identiferToLocation(variable);
|
|
68
68
|
}
|
|
69
69
|
return { hover, definition: location, implementation: location, definitionId: variable, scope: bottomScope };
|
|
@@ -155,6 +155,27 @@ class Table extends _abstract_object_1.AbstractObject {
|
|
|
155
155
|
type: new basic_1.GenericObjectReferenceType()
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
+
else if (field.REFTYPE === "S") {
|
|
159
|
+
const lookup = ddic.lookupTableOrView(field.ROLLNAME);
|
|
160
|
+
components.push({ name: field.FIELDNAME, type: new basic_1.DataReference(lookup.type) });
|
|
161
|
+
if (lookup.object) {
|
|
162
|
+
references.push({ object: lookup.object });
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
else if (field.REFTYPE === "L") {
|
|
166
|
+
const lookup = ddic.lookupTableType(field.ROLLNAME);
|
|
167
|
+
components.push({ name: field.FIELDNAME, type: new basic_1.DataReference(lookup.type) });
|
|
168
|
+
if (lookup.object) {
|
|
169
|
+
references.push({ object: lookup.object });
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
else if (field.REFTYPE === "E") {
|
|
173
|
+
const lookup = ddic.lookupDataElement(field.ROLLNAME);
|
|
174
|
+
components.push({ name: field.FIELDNAME, type: new basic_1.DataReference(lookup.type) });
|
|
175
|
+
if (lookup.object) {
|
|
176
|
+
references.push({ object: lookup.object });
|
|
177
|
+
}
|
|
178
|
+
}
|
|
158
179
|
else {
|
|
159
180
|
const lookup = ddic.lookupObject(field.ROLLNAME);
|
|
160
181
|
components.push({ name: field.FIELDNAME, type: lookup.type });
|
|
@@ -245,6 +266,7 @@ class Table extends _abstract_object_1.AbstractObject {
|
|
|
245
266
|
DECIMALS: field.DECIMALS,
|
|
246
267
|
KEYFLAG: field.KEYFLAG,
|
|
247
268
|
GROUPNAME: field.GROUPNAME,
|
|
269
|
+
REFTYPE: field.REFTYPE,
|
|
248
270
|
});
|
|
249
271
|
}
|
|
250
272
|
}
|
package/build/src/registry.js
CHANGED
|
@@ -22,6 +22,7 @@ const config_1 = require("../config");
|
|
|
22
22
|
const tokens_1 = require("../abap/1_lexer/tokens");
|
|
23
23
|
const include_graph_1 = require("../utils/include_graph");
|
|
24
24
|
const objects_1 = require("../objects");
|
|
25
|
+
const _builtin_1 = require("../abap/5_syntax/_builtin");
|
|
25
26
|
// todo: refactor each sub-rule to new classes?
|
|
26
27
|
// todo: add configuration
|
|
27
28
|
class DownportConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
@@ -1621,14 +1622,28 @@ ${indentation} output = ${topTarget}.`;
|
|
|
1621
1622
|
}
|
|
1622
1623
|
return undefined;
|
|
1623
1624
|
}
|
|
1624
|
-
replaceMethodConditional(node, lowFile,
|
|
1625
|
+
replaceMethodConditional(node, lowFile, highSyntax) {
|
|
1625
1626
|
for (const c of node.findAllExpressionsRecursive(Expressions.Compare)) {
|
|
1626
1627
|
const chain = c.findDirectExpression(Expressions.MethodCallChain);
|
|
1627
1628
|
if (chain === undefined) {
|
|
1628
1629
|
continue;
|
|
1629
1630
|
}
|
|
1631
|
+
let predicate = false;
|
|
1632
|
+
const spag = highSyntax.spaghetti.lookupPosition(node.getFirstToken().getStart(), lowFile.getFilename());
|
|
1633
|
+
for (const r of (spag === null || spag === void 0 ? void 0 : spag.getData().references) || []) {
|
|
1634
|
+
if (r.referenceType === _reference_1.ReferenceType.BuiltinMethodReference &&
|
|
1635
|
+
new _builtin_1.BuiltIn().isPredicate(chain.getFirstToken().getStr().toUpperCase())) {
|
|
1636
|
+
predicate = true;
|
|
1637
|
+
break;
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1630
1640
|
const end = chain.getLastToken().getEnd();
|
|
1631
|
-
|
|
1641
|
+
let fix = edit_helper_1.EditHelper.insertAt(lowFile, end, " IS NOT INITIAL");
|
|
1642
|
+
if (predicate === true) {
|
|
1643
|
+
fix = edit_helper_1.EditHelper.insertAt(lowFile, end, " ) = abap_true");
|
|
1644
|
+
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, chain.getFirstToken().getStart(), "boolc( ");
|
|
1645
|
+
fix = edit_helper_1.EditHelper.merge(fix, fix1);
|
|
1646
|
+
}
|
|
1632
1647
|
return issue_1.Issue.atToken(lowFile, chain.getFirstToken(), "Downport method conditional", this.getMetadata().key, this.conf.severity, fix);
|
|
1633
1648
|
}
|
|
1634
1649
|
return undefined;
|
|
@@ -45,6 +45,7 @@ https://github.com/SAP/styleguides/blob/main/clean-abap/CleanABAP.md#check-vs-re
|
|
|
45
45
|
const get = statement.get();
|
|
46
46
|
if (get instanceof Statements.Loop
|
|
47
47
|
|| get instanceof Statements.While
|
|
48
|
+
|| get instanceof Statements.LoopAtScreen
|
|
48
49
|
|| get instanceof Statements.SelectLoop
|
|
49
50
|
|| get instanceof Statements.Do) {
|
|
50
51
|
stack.push(statement);
|
|
@@ -81,12 +81,14 @@ EXPORTING must already be omitted for this rule to take effect, https://rules.ab
|
|
|
81
81
|
const p = (_a = parameters[0].findDirectExpression(Expressions.ParameterName)) === null || _a === void 0 ? void 0 : _a.getFirstToken();
|
|
82
82
|
if ((p === null || p === void 0 ? void 0 : p.getStr().toUpperCase()) === i.toUpperCase()) {
|
|
83
83
|
const message = "Omit default parameter name \"" + i + "\"";
|
|
84
|
-
let fix = undefined;
|
|
85
84
|
const end = (_b = parameters[0].findDirectExpression(Expressions.Source)) === null || _b === void 0 ? void 0 : _b.getFirstToken().getStart();
|
|
86
85
|
if (end) {
|
|
87
|
-
fix = edit_helper_1.EditHelper.deleteRange(file, p.getStart(), end);
|
|
86
|
+
const fix = edit_helper_1.EditHelper.deleteRange(file, p.getStart(), end);
|
|
87
|
+
issues.push(issue_1.Issue.atRange(file, p.getStart(), end, message, this.getMetadata().key, this.getConfig().severity, fix));
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
issues.push(issue_1.Issue.atToken(file, name.getFirstToken(), message, this.getMetadata().key, this.getConfig().severity));
|
|
88
91
|
}
|
|
89
|
-
issues.push(issue_1.Issue.atToken(file, name.getFirstToken(), message, this.getMetadata().key, this.getConfig().severity, fix));
|
|
90
92
|
}
|
|
91
93
|
}
|
|
92
94
|
}
|
|
@@ -80,8 +80,8 @@ DATA(percentage) = CONV decfloat34( comment_number / abs_statement_number ) * 10
|
|
|
80
80
|
for (const name in vars) {
|
|
81
81
|
const identifier = vars[name];
|
|
82
82
|
if (this.isLocalDefinition(node, identifier) === false
|
|
83
|
-
|| identifier.getMeta().includes("inline" /* InlineDefinition */)
|
|
84
|
-
|| identifier.getMeta().includes("form_parameter" /* FormParameter */)) {
|
|
83
|
+
|| identifier.getMeta().includes("inline" /* IdentifierMeta.InlineDefinition */)
|
|
84
|
+
|| identifier.getMeta().includes("form_parameter" /* IdentifierMeta.FormParameter */)) {
|
|
85
85
|
continue;
|
|
86
86
|
}
|
|
87
87
|
else if (identifier.getType().isGeneric() === true) {
|
|
@@ -44,7 +44,7 @@ class SlowParameterPassing {
|
|
|
44
44
|
const vars = m.getData().vars;
|
|
45
45
|
for (const v in vars) {
|
|
46
46
|
const id = vars[v];
|
|
47
|
-
if (id.getMeta().includes("pass_by_value" /* PassByValue */) === false) {
|
|
47
|
+
if (id.getMeta().includes("pass_by_value" /* IdentifierMeta.PassByValue */) === false) {
|
|
48
48
|
continue;
|
|
49
49
|
}
|
|
50
50
|
const writes = this.listWritePositions(m, id);
|
|
@@ -156,12 +156,12 @@ Unused variables are not reported if the object contains syntax errors. Errors f
|
|
|
156
156
|
}
|
|
157
157
|
else if (name === "ME"
|
|
158
158
|
|| name === "SUPER"
|
|
159
|
-
|| meta.includes("selection_screen_tab" /* SelectionScreenTab */)
|
|
160
|
-
|| meta.includes("event_parameter" /* EventParameter */)) {
|
|
159
|
+
|| meta.includes("selection_screen_tab" /* IdentifierMeta.SelectionScreenTab */)
|
|
160
|
+
|| meta.includes("event_parameter" /* IdentifierMeta.EventParameter */)) {
|
|
161
161
|
// todo, workaround for "me" and "super", these should somehow be typed to built-in
|
|
162
162
|
continue;
|
|
163
163
|
}
|
|
164
|
-
const isInline = meta.includes("inline" /* InlineDefinition */);
|
|
164
|
+
const isInline = meta.includes("inline" /* IdentifierMeta.InlineDefinition */);
|
|
165
165
|
this.workarea.push(vars[name], isInline ? 2 : 1);
|
|
166
166
|
}
|
|
167
167
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.90.
|
|
3
|
+
"version": "2.90.11",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
},
|
|
46
46
|
"homepage": "https://abaplint.org",
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@microsoft/api-extractor": "^7.24.
|
|
48
|
+
"@microsoft/api-extractor": "^7.24.2",
|
|
49
49
|
"@types/chai": "^4.3.1",
|
|
50
50
|
"@types/mocha": "^9.1.1",
|
|
51
|
-
"@types/node": "^17.0.
|
|
51
|
+
"@types/node": "^17.0.39",
|
|
52
52
|
"chai": "^4.3.6",
|
|
53
|
-
"eslint": "^8.
|
|
53
|
+
"eslint": "^8.17.0",
|
|
54
54
|
"mocha": "^10.0.0",
|
|
55
55
|
"c8": "^7.11.3",
|
|
56
56
|
"source-map-support": "^0.5.21",
|
|
57
57
|
"ts-json-schema-generator": "^1.0.0",
|
|
58
|
-
"typescript": "^4.
|
|
58
|
+
"typescript": "^4.7.3"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"fast-xml-parser": "^4.0.
|
|
61
|
+
"fast-xml-parser": "^4.0.8",
|
|
62
62
|
"json5": "^2.2.1",
|
|
63
63
|
"vscode-languageserver-types": "^3.17.1"
|
|
64
64
|
}
|