@abaplint/core 2.85.41 → 2.85.42

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.
@@ -3502,6 +3502,14 @@ declare class Loop_2 implements IStatement {
3502
3502
  getMatcher(): IStatementRunnable;
3503
3503
  }
3504
3504
 
3505
+ declare class LoopAtScreen implements IStructure {
3506
+ getMatcher(): IStructureRunnable;
3507
+ }
3508
+
3509
+ declare class LoopAtScreen_2 implements IStatement {
3510
+ getMatcher(): IStatementRunnable;
3511
+ }
3512
+
3505
3513
  declare class LoopGroupBy extends Expression {
3506
3514
  getRunnable(): IStatementRunnable;
3507
3515
  }
@@ -5026,6 +5034,7 @@ declare namespace Statements {
5026
5034
  BreakId,
5027
5035
  InterfaceDeferred,
5028
5036
  While_2 as While,
5037
+ LoopAtScreen_2 as LoopAtScreen,
5029
5038
  Loop_2 as Loop,
5030
5039
  Check,
5031
5040
  EndProvide,
@@ -5425,6 +5434,7 @@ declare namespace Structures {
5425
5434
  If,
5426
5435
  InterfaceGlobal,
5427
5436
  Interface_2 as Interface,
5437
+ LoopAtScreen,
5428
5438
  Loop,
5429
5439
  Method,
5430
5440
  Module,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.verNot = exports.ver = exports.plusPrio = exports.plus = exports.starPrio = exports.star = exports.per = exports.optPrio = exports.opt = exports.altPrio = exports.alt = exports.seq = exports.tok = exports.regex = exports.str = exports.Combi = exports.Expression = void 0;
3
+ exports.fail = exports.verNot = exports.ver = exports.plusPrio = exports.plus = exports.starPrio = exports.star = exports.per = exports.optPrio = exports.opt = exports.altPrio = exports.alt = exports.seq = exports.tok = exports.regex = exports.str = exports.Combi = exports.Expression = void 0;
4
4
  const Tokens = require("../1_lexer/tokens");
5
5
  const nodes_1 = require("../nodes");
6
6
  const version_1 = require("../../version");
@@ -572,6 +572,28 @@ class Permutation {
572
572
  return [""];
573
573
  }
574
574
  }
575
+ class FailCombinator extends Error {
576
+ }
577
+ class Fail {
578
+ listKeywords() {
579
+ return [];
580
+ }
581
+ getUsing() {
582
+ return [];
583
+ }
584
+ run(_r) {
585
+ throw new FailCombinator();
586
+ }
587
+ railroad() {
588
+ return "Railroad.Terminal('!Fail')";
589
+ }
590
+ toStr() {
591
+ return "fail()";
592
+ }
593
+ first() {
594
+ return [];
595
+ }
596
+ }
575
597
  class Alternative {
576
598
  constructor(list) {
577
599
  if (list.length < 2) {
@@ -711,18 +733,26 @@ class Combi {
711
733
  static run(runnable, tokens, version) {
712
734
  this.ver = version;
713
735
  const input = new result_1.Result(tokens, 0);
714
- const result = runnable.run([input]);
715
- /*
716
- console.log("res: " + result.length);
736
+ try {
737
+ const result = runnable.run([input]);
738
+ /*
739
+ console.log("res: " + result.length);
740
+ for (const res of result) {
741
+ console.dir(res.getNodes().map(n => n.get().constructor.name));
742
+ console.dir(res.getNodes().map(n => n.concatTokens()));
743
+ }
744
+ */
717
745
  for (const res of result) {
718
- console.dir(res.getNodes().map(n => n.get().constructor.name));
719
- console.dir(res.getNodes().map(n => n.concatTokens()));
746
+ if (res.remainingLength() === 0) {
747
+ return res.getNodes();
748
+ }
720
749
  }
721
- */
722
- for (const res of result) {
723
- if (res.remainingLength() === 0) {
724
- return res.getNodes();
750
+ }
751
+ catch (err) {
752
+ if (err instanceof FailCombinator) {
753
+ return undefined;
725
754
  }
755
+ throw err;
726
756
  }
727
757
  return undefined;
728
758
  }
@@ -824,4 +854,8 @@ function verNot(version, first) {
824
854
  return new VersNot(version, map(first));
825
855
  }
826
856
  exports.verNot = verNot;
857
+ function fail() {
858
+ return new Fail();
859
+ }
860
+ exports.fail = fail;
827
861
  //# sourceMappingURL=combi.js.map
@@ -36,6 +36,7 @@ __exportStar(require("./do"), exports);
36
36
  __exportStar(require("./break_id"), exports);
37
37
  __exportStar(require("./interface_deferred"), exports);
38
38
  __exportStar(require("./while"), exports);
39
+ __exportStar(require("./loop_at_screen"), exports);
39
40
  __exportStar(require("./loop"), exports);
40
41
  __exportStar(require("./check"), exports);
41
42
  __exportStar(require("./endprovide"), exports);
@@ -17,7 +17,7 @@ class Loop {
17
17
  const to = (0, combi_1.seq)("TO", expressions_1.Source);
18
18
  const usingKey = (0, combi_1.seq)("USING KEY", (0, combi_1.altPrio)(expressions_1.SimpleName, expressions_1.Dynamic));
19
19
  const options = (0, combi_1.per)(target, from, to, where, usingKey, group);
20
- const at = (0, combi_1.seq)("AT", (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp08, "GROUP")), (0, combi_1.alt)(simple_source2_1.SimpleSource2, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source)), (0, combi_1.opt)(options));
20
+ const at = (0, combi_1.seq)("AT", (0, combi_1.opt)((0, combi_1.seq)("SCREEN", (0, combi_1.fail)())), (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp08, "GROUP")), (0, combi_1.alt)(simple_source2_1.SimpleSource2, (0, combi_1.ver)(version_1.Version.v740sp02, expressions_1.Source)), (0, combi_1.opt)(options));
21
21
  return (0, combi_1.seq)("LOOP", (0, combi_1.opt)(at));
22
22
  }
23
23
  }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoopAtScreen = void 0;
4
+ const combi_1 = require("../combi");
5
+ const version_1 = require("../../../version");
6
+ const expressions_1 = require("../expressions");
7
+ class LoopAtScreen {
8
+ getMatcher() {
9
+ const l = (0, combi_1.seq)("LOOP AT SCREEN", (0, combi_1.opt)((0, combi_1.seq)("INTO", expressions_1.Target)));
10
+ return (0, combi_1.verNot)(version_1.Version.Cloud, l);
11
+ }
12
+ }
13
+ exports.LoopAtScreen = LoopAtScreen;
14
+ //# sourceMappingURL=loop_at_screen.js.map
@@ -41,6 +41,7 @@ __exportStar(require("./function_module"), exports);
41
41
  __exportStar(require("./if"), exports);
42
42
  __exportStar(require("./interface_global"), exports);
43
43
  __exportStar(require("./interface"), exports);
44
+ __exportStar(require("./loop_at_screen"), exports);
44
45
  __exportStar(require("./loop"), exports);
45
46
  __exportStar(require("./method"), exports);
46
47
  __exportStar(require("./module"), exports);
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoopAtScreen = void 0;
4
+ const Statements = require("../../2_statements/statements");
5
+ const _combi_1 = require("./_combi");
6
+ const _1 = require(".");
7
+ class LoopAtScreen {
8
+ getMatcher() {
9
+ return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.LoopAtScreen), (0, _combi_1.opt)((0, _combi_1.sub)(_1.Body)), (0, _combi_1.sta)(Statements.EndLoop));
10
+ }
11
+ }
12
+ exports.LoopAtScreen = LoopAtScreen;
13
+ //# sourceMappingURL=loop_at_screen.js.map
@@ -8,7 +8,7 @@ const _statement_1 = require("../../2_statements/statements/_statement");
8
8
  class Normal {
9
9
  getMatcher() {
10
10
  // note that the sequence of alternatives here influences performance
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.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
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
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));
13
13
  }
14
14
  }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoopAtScreen = void 0;
4
+ const Expressions = require("../../2_statements/expressions");
5
+ const target_1 = require("../expressions/target");
6
+ const inline_data_1 = require("../expressions/inline_data");
7
+ const basic_1 = require("../../types/basic");
8
+ class LoopAtScreen {
9
+ runSyntax(node, scope, filename) {
10
+ const target = node.findDirectExpression(Expressions.Target);
11
+ if (target) {
12
+ new target_1.Target().runSyntax(target, scope, filename);
13
+ }
14
+ const inline = target === null || target === void 0 ? void 0 : target.findDirectExpression(Expressions.InlineData);
15
+ if (inline) {
16
+ new inline_data_1.InlineData().runSyntax(inline, scope, filename, new basic_1.VoidType("SCREEN"));
17
+ }
18
+ }
19
+ }
20
+ exports.LoopAtScreen = LoopAtScreen;
21
+ //# sourceMappingURL=loop_at_screen.js.map
@@ -130,6 +130,7 @@ const delete_cluster_1 = require("./statements/delete_cluster");
130
130
  const unassign_1 = require("./statements/unassign");
131
131
  const insert_textpool_1 = require("./statements/insert_textpool");
132
132
  const get_cursor_1 = require("./statements/get_cursor");
133
+ const loop_at_screen_1 = require("./statements/loop_at_screen");
133
134
  // -----------------------------------
134
135
  const map = {};
135
136
  function addToMap(handler) {
@@ -155,6 +156,7 @@ if (Object.keys(map).length === 0) {
155
156
  addToMap(new assert_1.Assert());
156
157
  addToMap(new catch_1.Catch());
157
158
  addToMap(new loop_1.Loop());
159
+ addToMap(new loop_at_screen_1.LoopAtScreen());
158
160
  addToMap(new set_pf_status_1.SetPFStatus());
159
161
  addToMap(new set_titlebar_1.SetTitlebar());
160
162
  addToMap(new submit_1.Submit());
@@ -139,6 +139,7 @@ class Indent {
139
139
  || type instanceof Statements.WhenOthers
140
140
  || type instanceof Statements.Cleanup
141
141
  || type instanceof Statements.Loop
142
+ || type instanceof Statements.LoopAtScreen
142
143
  || type instanceof Statements.CatchSystemExceptions
143
144
  || type instanceof Statements.Form
144
145
  || type instanceof Statements.Else
@@ -68,7 +68,7 @@ class Registry {
68
68
  }
69
69
  static abaplintVersion() {
70
70
  // magic, see build script "version.sh"
71
- return "2.85.41";
71
+ return "2.85.42";
72
72
  }
73
73
  getDDICReferences() {
74
74
  return this.references;
@@ -846,7 +846,7 @@ ${indentation} output = ${topTarget}.`;
846
846
  return undefined;
847
847
  }
848
848
  outlineFor(forLoop, indentation) {
849
- var _a, _b, _c, _d, _e, _f;
849
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
850
850
  let body = "";
851
851
  let end = "";
852
852
  const loopSource = (_a = forLoop.findFirstExpression(Expressions.Source)) === null || _a === void 0 ? void 0 : _a.concatTokens();
@@ -860,12 +860,21 @@ ${indentation} output = ${topTarget}.`;
860
860
  body += indentation + ` ${field} = ${field} + 1.\n`;
861
861
  end = "ENDWHILE";
862
862
  }
863
+ else if (forLoop.findDirectTokenByText("WHILE")) {
864
+ const name = (_f = forLoop.findFirstExpression(Expressions.Field)) === null || _f === void 0 ? void 0 : _f.concatTokens();
865
+ body += indentation + "DATA " + name + " TYPE i.\n";
866
+ const cond = forLoop.findFirstExpression(Expressions.Cond);
867
+ body += indentation + `WHILE ${cond === null || cond === void 0 ? void 0 : cond.concatTokens()}.\n`;
868
+ const field = (_h = (_g = forLoop.findDirectExpression(Expressions.InlineFieldDefinition)) === null || _g === void 0 ? void 0 : _g.findFirstExpression(Expressions.Field)) === null || _h === void 0 ? void 0 : _h.concatTokens();
869
+ body += indentation + ` ${field} = ${field} + 1.\n`;
870
+ end = "ENDWHILE";
871
+ }
863
872
  else if (loopTargetField) {
864
873
  body += indentation + `LOOP AT ${loopSource} INTO DATA(${loopTargetField}).\n`;
865
874
  end = "ENDLOOP";
866
875
  }
867
876
  else if (loopTargetField === undefined) {
868
- const loopTargetFieldSymbol = (_f = forLoop.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _f === void 0 ? void 0 : _f.concatTokens();
877
+ const loopTargetFieldSymbol = (_j = forLoop.findFirstExpression(Expressions.TargetFieldSymbol)) === null || _j === void 0 ? void 0 : _j.concatTokens();
869
878
  body += indentation + `LOOP AT ${loopSource} ASSIGNING FIELD-SYMBOL(${loopTargetFieldSymbol}).\n`;
870
879
  end = "ENDLOOP";
871
880
  }
@@ -55,7 +55,7 @@ If the target is a sorted/hashed table, no issue is reported`,
55
55
  const selects = stru.findAllStatements(Statements.Select);
56
56
  selects.push(...stru.findAllStatements(Statements.SelectLoop));
57
57
  for (const s of selects) {
58
- const c = s.concatTokens();
58
+ const c = s.concatTokens().toUpperCase();
59
59
  if (c.startsWith("SELECT SINGLE ")) {
60
60
  continue;
61
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.85.41",
3
+ "version": "2.85.42",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",