@abaplint/core 2.95.27 → 2.95.29
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 +20 -0
- package/build/src/abap/2_statements/statements/at.js +1 -1
- package/build/src/abap/2_statements/statements/at_first.js +11 -0
- package/build/src/abap/2_statements/statements/at_last.js +11 -0
- package/build/src/abap/2_statements/statements/index.js +2 -0
- package/build/src/abap/3_structures/structures/at_first.js +13 -0
- package/build/src/abap/3_structures/structures/at_last.js +13 -0
- package/build/src/abap/3_structures/structures/index.js +2 -0
- package/build/src/abap/3_structures/structures/normal.js +1 -1
- package/build/src/abap/5_syntax/structures/data.js +5 -2
- package/build/src/pretty_printer/indent.js +2 -0
- package/build/src/registry.js +1 -1
- package/build/src/rules/downport.js +26 -0
- package/build/src/rules/empty_structure.js +2 -0
- package/package.json +3 -3
package/build/abaplint.d.ts
CHANGED
|
@@ -247,6 +247,22 @@ declare class At_3 extends Token {
|
|
|
247
247
|
static railroad(): string;
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
+
declare class AtFirst implements IStructure {
|
|
251
|
+
getMatcher(): IStructureRunnable;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
declare class AtFirst_2 implements IStatement {
|
|
255
|
+
getMatcher(): IStatementRunnable;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
declare class AtLast implements IStructure {
|
|
259
|
+
getMatcher(): IStructureRunnable;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
declare class AtLast_2 implements IStatement {
|
|
263
|
+
getMatcher(): IStatementRunnable;
|
|
264
|
+
}
|
|
265
|
+
|
|
250
266
|
declare class AtLineSelection implements IStatement {
|
|
251
267
|
getMatcher(): IStatementRunnable;
|
|
252
268
|
}
|
|
@@ -5534,6 +5550,8 @@ declare namespace Statements {
|
|
|
5534
5550
|
Scan,
|
|
5535
5551
|
Export,
|
|
5536
5552
|
Import,
|
|
5553
|
+
AtFirst_2 as AtFirst,
|
|
5554
|
+
AtLast_2 as AtLast,
|
|
5537
5555
|
At_2 as At,
|
|
5538
5556
|
Put,
|
|
5539
5557
|
EndAt,
|
|
@@ -5745,6 +5763,8 @@ declare namespace Structures {
|
|
|
5745
5763
|
export {
|
|
5746
5764
|
Any,
|
|
5747
5765
|
At,
|
|
5766
|
+
AtFirst,
|
|
5767
|
+
AtLast,
|
|
5748
5768
|
Body,
|
|
5749
5769
|
CaseType,
|
|
5750
5770
|
Case,
|
|
@@ -9,7 +9,7 @@ class At {
|
|
|
9
9
|
const atNew = (0, combi_1.seq)("NEW", field);
|
|
10
10
|
const atEnd = (0, combi_1.seq)("END OF", field);
|
|
11
11
|
const group = (0, combi_1.regex)(/^\w+$/);
|
|
12
|
-
const ret = (0, combi_1.seq)("AT", (0, combi_1.altPrio)(
|
|
12
|
+
const ret = (0, combi_1.seq)("AT", (0, combi_1.altPrio)(atNew, atEnd, group));
|
|
13
13
|
return ret;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AtFirst = void 0;
|
|
4
|
+
const combi_1 = require("../combi");
|
|
5
|
+
class AtFirst {
|
|
6
|
+
getMatcher() {
|
|
7
|
+
return (0, combi_1.str)("AT FIRST");
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.AtFirst = AtFirst;
|
|
11
|
+
//# sourceMappingURL=at_first.js.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AtLast = void 0;
|
|
4
|
+
const combi_1 = require("../combi");
|
|
5
|
+
class AtLast {
|
|
6
|
+
getMatcher() {
|
|
7
|
+
return (0, combi_1.str)("AT LAST");
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
exports.AtLast = AtLast;
|
|
11
|
+
//# sourceMappingURL=at_last.js.map
|
|
@@ -204,6 +204,8 @@ __exportStar(require("./submit"), exports);
|
|
|
204
204
|
__exportStar(require("./scan"), exports);
|
|
205
205
|
__exportStar(require("./export"), exports);
|
|
206
206
|
__exportStar(require("./import"), exports);
|
|
207
|
+
__exportStar(require("./at_first"), exports);
|
|
208
|
+
__exportStar(require("./at_last"), exports);
|
|
207
209
|
__exportStar(require("./at"), exports);
|
|
208
210
|
__exportStar(require("./put"), exports);
|
|
209
211
|
__exportStar(require("./endat"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AtFirst = void 0;
|
|
4
|
+
const Statements = require("../../2_statements/statements");
|
|
5
|
+
const _combi_1 = require("./_combi");
|
|
6
|
+
const body_1 = require("./body");
|
|
7
|
+
class AtFirst {
|
|
8
|
+
getMatcher() {
|
|
9
|
+
return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.AtFirst), (0, _combi_1.opt)((0, _combi_1.sub)(body_1.Body)), (0, _combi_1.sta)(Statements.EndAt));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.AtFirst = AtFirst;
|
|
13
|
+
//# sourceMappingURL=at_first.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AtLast = void 0;
|
|
4
|
+
const Statements = require("../../2_statements/statements");
|
|
5
|
+
const _combi_1 = require("./_combi");
|
|
6
|
+
const body_1 = require("./body");
|
|
7
|
+
class AtLast {
|
|
8
|
+
getMatcher() {
|
|
9
|
+
return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.AtLast), (0, _combi_1.opt)((0, _combi_1.sub)(body_1.Body)), (0, _combi_1.sta)(Statements.EndAt));
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.AtLast = AtLast;
|
|
13
|
+
//# sourceMappingURL=at_last.js.map
|
|
@@ -16,6 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./any"), exports);
|
|
18
18
|
__exportStar(require("./at"), exports);
|
|
19
|
+
__exportStar(require("./at_first"), exports);
|
|
20
|
+
__exportStar(require("./at_last"), exports);
|
|
19
21
|
__exportStar(require("./body"), exports);
|
|
20
22
|
__exportStar(require("./case_type"), exports);
|
|
21
23
|
__exportStar(require("./case"), exports);
|
|
@@ -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.FormDefinition), (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));
|
|
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.FormDefinition), (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.AtFirst), (0, _combi_1.sub)(Structures.AtLast), (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;
|
|
@@ -22,7 +22,9 @@ class Data {
|
|
|
22
22
|
const found = new data_1.Data().runSyntax(c, scope, filename);
|
|
23
23
|
if (found) {
|
|
24
24
|
components.push({ name: found.getName(), type: found.getType() });
|
|
25
|
-
|
|
25
|
+
if (found.getValue() !== undefined) {
|
|
26
|
+
values[found.getName()] = found.getValue();
|
|
27
|
+
}
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
else if (c instanceof nodes_1.StructureNode && ctyp instanceof Structures.Data) {
|
|
@@ -77,7 +79,8 @@ class Data {
|
|
|
77
79
|
return new _typed_identifier_1.TypedIdentifier(name, filename, new Basic.TableType(new Basic.StructureType(components), { withHeader: true }));
|
|
78
80
|
}
|
|
79
81
|
else {
|
|
80
|
-
|
|
82
|
+
const val = Object.keys(values).length > 0 ? values : undefined;
|
|
83
|
+
return new _typed_identifier_1.TypedIdentifier(name, filename, new Basic.StructureType(components), undefined, val);
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
86
|
}
|
|
@@ -134,6 +134,8 @@ class Indent {
|
|
|
134
134
|
|| type instanceof Statements.Interface
|
|
135
135
|
|| type instanceof Statements.Do
|
|
136
136
|
|| type instanceof Statements.At
|
|
137
|
+
|| type instanceof Statements.AtFirst
|
|
138
|
+
|| type instanceof Statements.AtLast
|
|
137
139
|
|| type instanceof Statements.ExecSQL
|
|
138
140
|
|| type instanceof Statements.Catch
|
|
139
141
|
|| type instanceof Statements.Define
|
package/build/src/registry.js
CHANGED
|
@@ -406,6 +406,10 @@ Only one transformation is applied to a statement at a time, so multiple steps m
|
|
|
406
406
|
if (found) {
|
|
407
407
|
return found;
|
|
408
408
|
}
|
|
409
|
+
found = this.outlineGetReferenceSimple(high, lowFile);
|
|
410
|
+
if (found) {
|
|
411
|
+
return found;
|
|
412
|
+
}
|
|
409
413
|
found = this.outlineDataSimple(high, lowFile);
|
|
410
414
|
if (found) {
|
|
411
415
|
return found;
|
|
@@ -827,6 +831,28 @@ ${indentation}CATCH ${className} INTO ${targetName}.`;
|
|
|
827
831
|
const fix = edit_helper_1.EditHelper.replaceRange(lowFile, node.getStart(), node.getEnd(), code);
|
|
828
832
|
return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
|
|
829
833
|
}
|
|
834
|
+
outlineGetReferenceSimple(node, lowFile) {
|
|
835
|
+
var _a, _b, _c;
|
|
836
|
+
if (!(node.get() instanceof Statements.GetReference)) {
|
|
837
|
+
return undefined;
|
|
838
|
+
}
|
|
839
|
+
const target = node.findFirstExpression(Expressions.Target);
|
|
840
|
+
if (!(((_a = target === null || target === void 0 ? void 0 : target.getFirstChild()) === null || _a === void 0 ? void 0 : _a.get()) instanceof Expressions.InlineData)) {
|
|
841
|
+
return undefined;
|
|
842
|
+
}
|
|
843
|
+
const source = node.findFirstExpression(Expressions.Source);
|
|
844
|
+
if (!(((_b = source === null || source === void 0 ? void 0 : source.getFirstChild()) === null || _b === void 0 ? void 0 : _b.get()) instanceof Expressions.FieldChain)) {
|
|
845
|
+
return undefined;
|
|
846
|
+
}
|
|
847
|
+
const targetName = ((_c = target.findFirstExpression(Expressions.TargetField)) === null || _c === void 0 ? void 0 : _c.concatTokens()) || "errorError";
|
|
848
|
+
const indentation = " ".repeat(node.getFirstToken().getStart().getCol() - 1);
|
|
849
|
+
const firstToken = target.getFirstToken();
|
|
850
|
+
const lastToken = target.getLastToken();
|
|
851
|
+
const fix1 = edit_helper_1.EditHelper.insertAt(lowFile, node.getStart(), `DATA ${targetName} LIKE REF TO ${source.concatTokens()}.\n${indentation}`);
|
|
852
|
+
const fix2 = edit_helper_1.EditHelper.replaceRange(lowFile, firstToken.getStart(), lastToken.getEnd(), targetName);
|
|
853
|
+
const fix = edit_helper_1.EditHelper.merge(fix2, fix1);
|
|
854
|
+
return issue_1.Issue.atToken(lowFile, node.getFirstToken(), "Outline DATA", this.getMetadata().key, this.conf.severity, fix);
|
|
855
|
+
}
|
|
830
856
|
outlineDataSimple(node, lowFile) {
|
|
831
857
|
// outlines "DATA(ls_msg) = temp1.", note that this does not need to look at types
|
|
832
858
|
var _a, _b, _c;
|
|
@@ -78,6 +78,8 @@ class EmptyStructure extends _abap_rule_1.ABAPRule {
|
|
|
78
78
|
}
|
|
79
79
|
if (this.getConfig().at === true) {
|
|
80
80
|
candidates.push(...stru.findAllStructures(Structures.At));
|
|
81
|
+
candidates.push(...stru.findAllStructures(Structures.AtFirst));
|
|
82
|
+
candidates.push(...stru.findAllStructures(Structures.AtLast));
|
|
81
83
|
}
|
|
82
84
|
for (const l of candidates) {
|
|
83
85
|
if (l.getChildren().length === 2) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abaplint/core",
|
|
3
|
-
"version": "2.95.
|
|
3
|
+
"version": "2.95.29",
|
|
4
4
|
"description": "abaplint - Core API",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"typings": "build/abaplint.d.ts",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@microsoft/api-extractor": "^7.34.4",
|
|
51
51
|
"@types/chai": "^4.3.4",
|
|
52
52
|
"@types/mocha": "^10.0.1",
|
|
53
|
-
"@types/node": "^18.14.
|
|
53
|
+
"@types/node": "^18.14.5",
|
|
54
54
|
"chai": "^4.3.7",
|
|
55
55
|
"eslint": "^8.35.0",
|
|
56
56
|
"mocha": "^10.2.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"typescript": "^4.9.5"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"fast-xml-parser": "^4.1.
|
|
63
|
+
"fast-xml-parser": "^4.1.3",
|
|
64
64
|
"json5": "^2.2.3",
|
|
65
65
|
"vscode-languageserver-types": "^3.17.3"
|
|
66
66
|
}
|