@abaplint/core 2.113.226 → 2.113.228

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.
@@ -4318,6 +4318,14 @@ declare class LoopAtScreen_2 implements IStatement {
4318
4318
  getMatcher(): IStatementRunnable;
4319
4319
  }
4320
4320
 
4321
+ declare class LoopExtract implements IStructure {
4322
+ getMatcher(): IStructureRunnable;
4323
+ }
4324
+
4325
+ declare class LoopExtract_2 implements IStatement {
4326
+ getMatcher(): IStatementRunnable;
4327
+ }
4328
+
4321
4329
  declare class LoopGroupBy extends Expression {
4322
4330
  getRunnable(): IStatementRunnable;
4323
4331
  }
@@ -6591,6 +6599,7 @@ declare namespace Statements {
6591
6599
  Break,
6592
6600
  DeleteTextpool,
6593
6601
  Get,
6602
+ LoopExtract_2 as LoopExtract,
6594
6603
  SelectOption,
6595
6604
  Convert,
6596
6605
  Static,
@@ -6828,6 +6837,7 @@ declare namespace Structures {
6828
6837
  Statics,
6829
6838
  TestInjection,
6830
6839
  TestSeam,
6840
+ LoopExtract,
6831
6841
  Try,
6832
6842
  TypeEnum,
6833
6843
  TypeMesh,
@@ -3,9 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InlineField = void 0;
4
4
  const combi_1 = require("../combi");
5
5
  const _1 = require(".");
6
+ const tokens_1 = require("../../1_lexer/tokens");
6
7
  class InlineField extends combi_1.Expression {
7
8
  getRunnable() {
8
- return new _1.Field();
9
+ return (0, combi_1.seq)(_1.Field, (0, combi_1.starPrio)((0, combi_1.seq)((0, combi_1.tok)(tokens_1.Dash), _1.FieldAll)));
9
10
  }
10
11
  }
11
12
  exports.InlineField = InlineField;
@@ -22,7 +22,7 @@ class SelectLoop extends combi_1.Expression {
22
22
  const into = (0, combi_1.altPrio)(sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList);
23
23
  const perm = (0, combi_1.per)(_1.SQLFrom, where, sql_up_to_1.SQLUpTo, sql_order_by_1.SQLOrderBy, sql_having_1.SQLHaving, _1.SQLClient, bypass, _1.SQLGroupBy, _1.SQLForAllEntries, (0, combi_1.alt)(tab, sql_into_structure_1.SQLIntoStructure, _1.SQLIntoList, packTab));
24
24
  const strict = (0, combi_1.seq)(_1.SQLFrom, (0, combi_1.ver)(version_1.Version.v750, sql_fields_loop_1.SQLFieldsLoop), (0, combi_1.optPrio)(_1.SQLForAllEntries), (0, combi_1.optPrio)((0, combi_1.seq)(where, (0, combi_1.optPrio)(sql_order_by_1.SQLOrderBy), into, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo))));
25
- const aggr = (0, combi_1.seq)(_1.SQLAggregation, into, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), _1.SQLFrom, where, _1.SQLGroupBy);
25
+ const aggr = (0, combi_1.seq)((0, combi_1.plusPrio)(_1.SQLAggregation), into, (0, combi_1.optPrio)(sql_up_to_1.SQLUpTo), _1.SQLFrom, (0, combi_1.optPrio)(_1.SQLClient), (0, combi_1.optPrio)(where), _1.SQLGroupBy);
26
26
  const ret = (0, combi_1.seq)("SELECT", (0, combi_1.altPrio)((0, combi_1.seq)((0, combi_1.optPrio)("DISTINCT"), sql_field_list_loop_1.SQLFieldListLoop, perm), strict, aggr), (0, combi_1.optPrio)(sql_hints_1.SQLHints));
27
27
  return ret;
28
28
  }
@@ -246,6 +246,7 @@ __exportStar(require("./editor_call"), exports);
246
246
  __exportStar(require("./break"), exports);
247
247
  __exportStar(require("./delete_textpool"), exports);
248
248
  __exportStar(require("./get"), exports);
249
+ __exportStar(require("./loop_extract"), exports);
249
250
  __exportStar(require("./selectoption"), exports);
250
251
  __exportStar(require("./convert"), exports);
251
252
  __exportStar(require("./static"), exports);
@@ -14,8 +14,8 @@ class Loop {
14
14
  const to = (0, combi_1.seq)("TO", expressions_1.Source);
15
15
  const usingKey = (0, combi_1.seq)("USING KEY", (0, combi_1.altPrio)(expressions_1.SimpleName, expressions_1.Dynamic));
16
16
  const options = (0, combi_1.per)(expressions_1.LoopTarget, from, to, where, usingKey, group, step);
17
- const at = (0, combi_1.seq)("AT", (0, combi_1.opt)((0, combi_1.seq)("SCREEN", (0, combi_1.failCombinator)())), (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp08, "GROUP", version_1.Version.OpenABAP)), expressions_1.LoopSource, (0, combi_1.opt)(options));
18
- return (0, combi_1.seq)("LOOP", (0, combi_1.opt)(at));
17
+ const at = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.seq)("SCREEN", (0, combi_1.failCombinator)())), (0, combi_1.opt)((0, combi_1.ver)(version_1.Version.v740sp08, "GROUP", version_1.Version.OpenABAP)), expressions_1.LoopSource, (0, combi_1.opt)(options));
18
+ return (0, combi_1.seq)("LOOP AT", at);
19
19
  }
20
20
  }
21
21
  exports.Loop = Loop;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoopExtract = void 0;
4
+ const combi_1 = require("../combi");
5
+ class LoopExtract {
6
+ getMatcher() {
7
+ return (0, combi_1.str)("LOOP");
8
+ }
9
+ }
10
+ exports.LoopExtract = LoopExtract;
11
+ //# sourceMappingURL=loop_extract.js.map
@@ -7,10 +7,11 @@ const expressions_1 = require("../expressions");
7
7
  const version_1 = require("../../../version");
8
8
  class SelectionScreen {
9
9
  getMatcher() {
10
- const beginBlock = (0, combi_1.seq)("BEGIN OF BLOCK", expressions_1.BlockName, (0, combi_1.optPrio)("WITH FRAME"), (0, combi_1.optPrio)((0, combi_1.seq)("TITLE", (0, combi_1.alt)(expressions_1.InlineField, expressions_1.TextElement))), (0, combi_1.optPrio)("NO INTERVALS"));
10
+ const text = (0, combi_1.altPrio)(expressions_1.TextElement, expressions_1.InlineField);
11
+ const beginBlock = (0, combi_1.seq)("BEGIN OF BLOCK", expressions_1.BlockName, (0, combi_1.optPrio)("WITH FRAME"), (0, combi_1.optPrio)((0, combi_1.seq)("TITLE", text)), (0, combi_1.optPrio)("NO INTERVALS"));
11
12
  const endBlock = (0, combi_1.seq)("END OF BLOCK", expressions_1.BlockName);
12
13
  const nesting = (0, combi_1.seq)("NESTING LEVEL", expressions_1.Source);
13
- const scrOptions = (0, combi_1.per)((0, combi_1.seq)("AS", (0, combi_1.alt)("WINDOW", "SUBSCREEN")), (0, combi_1.seq)("TITLE", (0, combi_1.alt)(expressions_1.InlineField, expressions_1.TextElement)), "NO INTERVALS", nesting);
14
+ const scrOptions = (0, combi_1.per)((0, combi_1.seq)("AS", (0, combi_1.alt)("WINDOW", "SUBSCREEN")), (0, combi_1.seq)("TITLE", text), "NO INTERVALS", nesting);
14
15
  const beginScreen = (0, combi_1.seq)("BEGIN OF SCREEN", expressions_1.Integer, (0, combi_1.opt)(scrOptions));
15
16
  const endScreen = (0, combi_1.seq)("END OF SCREEN", expressions_1.Integer);
16
17
  const beginLine = (0, combi_1.str)("BEGIN OF LINE");
@@ -21,12 +22,12 @@ class SelectionScreen {
21
22
  const ldb = (0, combi_1.seq)("FOR FIELD", expressions_1.FieldSub, (0, combi_1.optPrio)(ldbId));
22
23
  const commentOpt = (0, combi_1.per)(ldb, modif, visible);
23
24
  const position = (0, combi_1.seq)((0, combi_1.opt)((0, combi_1.regex)(/^\/?[\d\w]+$/)), (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenLeft), (0, combi_1.tok)(tokens_1.WParenLeft)), expressions_1.Integer, (0, combi_1.altPrio)((0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.tok)(tokens_1.ParenRight)));
24
- const comment = (0, combi_1.seq)("COMMENT", position, (0, combi_1.opt)((0, combi_1.alt)(expressions_1.InlineField, expressions_1.TextElement)), (0, combi_1.opt)(commentOpt));
25
+ const comment = (0, combi_1.seq)("COMMENT", position, (0, combi_1.opt)(text), (0, combi_1.opt)(commentOpt));
25
26
  const command = (0, combi_1.seq)("USER-COMMAND", (0, combi_1.alt)(expressions_1.Field, expressions_1.Constant));
26
- const push = (0, combi_1.seq)("PUSHBUTTON", position, (0, combi_1.alt)(expressions_1.InlineField, expressions_1.TextElement), command, (0, combi_1.opt)(modif), (0, combi_1.opt)(visible));
27
+ const push = (0, combi_1.seq)("PUSHBUTTON", position, text, command, (0, combi_1.opt)(modif), (0, combi_1.opt)(visible));
27
28
  const prog = (0, combi_1.seq)("PROGRAM", expressions_1.Field);
28
29
  const def = (0, combi_1.seq)("DEFAULT", (0, combi_1.opt)(prog), "SCREEN", expressions_1.Integer);
29
- const tab = (0, combi_1.seq)("TAB", (0, combi_1.tok)(tokens_1.WParenLeft), expressions_1.Integer, (0, combi_1.tok)(tokens_1.ParenRightW), (0, combi_1.alt)(expressions_1.InlineField, expressions_1.TextElement), command, (0, combi_1.opt)(def), (0, combi_1.opt)(modif));
30
+ const tab = (0, combi_1.seq)("TAB", (0, combi_1.tok)(tokens_1.WParenLeft), expressions_1.Integer, (0, combi_1.tok)(tokens_1.ParenRightW), text, command, (0, combi_1.opt)(def), (0, combi_1.opt)(modif));
30
31
  const func = (0, combi_1.seq)("FUNCTION KEY", expressions_1.Integer);
31
32
  const skip = (0, combi_1.seq)("SKIP", (0, combi_1.opt)(expressions_1.Integer));
32
33
  const posSymbols = (0, combi_1.altPrio)("POS_LOW", "POS_HIGH");
@@ -64,6 +64,7 @@ __exportStar(require("./dynpro_loop"), exports);
64
64
  __exportStar(require("./statics"), exports);
65
65
  __exportStar(require("./test_injection"), exports);
66
66
  __exportStar(require("./test_seam"), exports);
67
+ __exportStar(require("./loop_extract"), exports);
67
68
  __exportStar(require("./try"), exports);
68
69
  __exportStar(require("./type_enum"), exports);
69
70
  __exportStar(require("./type_mesh"), exports);
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoopExtract = void 0;
4
+ const Statements = require("../../2_statements/statements");
5
+ const _combi_1 = require("./_combi");
6
+ const _1 = require(".");
7
+ class LoopExtract {
8
+ getMatcher() {
9
+ return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.LoopExtract), (0, _combi_1.star)((0, _combi_1.sub)(_1.Body)), (0, _combi_1.sta)(Statements.EndLoop));
10
+ }
11
+ }
12
+ exports.LoopExtract = LoopExtract;
13
+ //# sourceMappingURL=loop_extract.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.LoopAtScreen), (0, _combi_1.sub)(Structures.Loop), (0, _combi_1.sta)(Statements.Append), (0, _combi_1.sub)(Structures.Try), (0, _combi_1.sub)(Structures.OnChange), (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.sub)(Structures.LoopExtract), (0, _combi_1.sta)(Statements.Append), (0, _combi_1.sub)(Structures.Try), (0, _combi_1.sub)(Structures.OnChange), (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.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.RaiseEntityEvent), (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.sta)(Statements.Module), // todo, should be dynpro specific
13
13
  (0, _combi_1.sta)(Statements.Field), // todo, should be dynpro specific
14
14
  (0, _combi_1.sub)(Structures.Chain), // todo, should be dynpro specific
@@ -4,9 +4,10 @@ exports.OnChange = void 0;
4
4
  const Statements = require("../../2_statements/statements");
5
5
  const _combi_1 = require("./_combi");
6
6
  const body_1 = require("./body");
7
+ const else_1 = require("./else");
7
8
  class OnChange {
8
9
  getMatcher() {
9
- return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.OnChange), (0, _combi_1.opt)((0, _combi_1.sub)(body_1.Body)), (0, _combi_1.sta)(Statements.EndOn));
10
+ return (0, _combi_1.beginEnd)((0, _combi_1.sta)(Statements.OnChange), (0, _combi_1.seq)((0, _combi_1.opt)((0, _combi_1.sub)(body_1.Body)), (0, _combi_1.opt)((0, _combi_1.sub)(else_1.Else))), (0, _combi_1.sta)(Statements.EndOn));
10
11
  }
11
12
  }
12
13
  exports.OnChange = OnChange;
@@ -848,7 +848,10 @@ class BasicTypes {
848
848
  }
849
849
  }
850
850
  const found = this.resolveTypeName(chain);
851
- if (found && !(found instanceof Types.UnknownType) && !(found instanceof Types.VoidType)) {
851
+ if (found && found instanceof Types.VoidType) {
852
+ return found;
853
+ }
854
+ else if (found && !(found instanceof Types.UnknownType)) {
852
855
  return new Types.DataReference(found);
853
856
  }
854
857
  else if (chain.concatTokens().toUpperCase() === "DATA") {
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Free = void 0;
4
+ const Expressions = require("../../2_statements/expressions");
5
+ const target_1 = require("../expressions/target");
6
+ class Free {
7
+ runSyntax(node, input) {
8
+ for (const t of node.findDirectExpressions(Expressions.Target)) {
9
+ target_1.Target.runSyntax(t, input);
10
+ }
11
+ }
12
+ }
13
+ exports.Free = Free;
14
+ //# sourceMappingURL=free.js.map
@@ -9,7 +9,7 @@ const _syntax_input_1 = require("../_syntax_input");
9
9
  const assert_error_1 = require("../assert_error");
10
10
  class IncludeType {
11
11
  runSyntax(node, input) {
12
- var _a, _b, _c;
12
+ var _a, _b, _c, _d, _e;
13
13
  const components = [];
14
14
  const iname = node.findFirstExpression(Expressions.TypeName);
15
15
  if (iname === undefined) {
@@ -24,7 +24,10 @@ class IncludeType {
24
24
  ityp = found;
25
25
  }
26
26
  }
27
- const as = (_b = node.findExpressionAfterToken("AS")) === null || _b === void 0 ? void 0 : _b.concatTokens();
27
+ else if (ityp instanceof basic_1.UnknownType) {
28
+ ityp = (_c = (_b = input.scope.findVariable(name)) === null || _b === void 0 ? void 0 : _b.getType()) !== null && _c !== void 0 ? _c : ityp;
29
+ }
30
+ const as = (_d = node.findExpressionAfterToken("AS")) === null || _d === void 0 ? void 0 : _d.concatTokens();
28
31
  if (as && ityp instanceof basic_1.StructureType) {
29
32
  ityp = new basic_1.StructureType(ityp.getComponents().concat([{
30
33
  name: as,
@@ -38,12 +41,15 @@ class IncludeType {
38
41
  if (ityp instanceof basic_1.VoidType) {
39
42
  return ityp;
40
43
  }
44
+ else if (ityp instanceof basic_1.UnknownType) {
45
+ return ityp;
46
+ }
41
47
  if (!(ityp instanceof basic_1.StructureType)) {
42
48
  const message = "not structured, " + name;
43
49
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, iname.getFirstToken(), message));
44
50
  return basic_1.VoidType.get(_syntax_input_1.CheckSyntaxKey);
45
51
  }
46
- const suffix = (_c = node.findExpressionAfterToken("SUFFIX")) === null || _c === void 0 ? void 0 : _c.concatTokens();
52
+ const suffix = (_e = node.findExpressionAfterToken("SUFFIX")) === null || _e === void 0 ? void 0 : _e.concatTokens();
47
53
  if (suffix && ityp instanceof basic_1.StructureType) {
48
54
  const components = [];
49
55
  for (const c of ityp.getComponents()) {
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Refresh = void 0;
4
+ const Expressions = require("../../2_statements/expressions");
5
+ const target_1 = require("../expressions/target");
6
+ class Refresh {
7
+ runSyntax(node, input) {
8
+ for (const t of node.findDirectExpressions(Expressions.Target)) {
9
+ target_1.Target.runSyntax(t, input);
10
+ }
11
+ }
12
+ }
13
+ exports.Refresh = Refresh;
14
+ //# sourceMappingURL=refresh.js.map
@@ -18,8 +18,8 @@ class SelectionScreen {
18
18
  return;
19
19
  }
20
20
  const field = node.findFirstExpression(Expressions.InlineField);
21
- if (field !== undefined && field.getFirstToken().getStr().length > 8) {
22
- const message = "SELECTION-SCREEN name too long, " + field.getFirstToken().getStr();
21
+ if (field !== undefined && field.concatTokens().length > 8) {
22
+ const message = "SELECTION-SCREEN name too long, " + field.concatTokens();
23
23
  input.issues.push((0, _syntax_input_1.syntaxIssue)(input, field.getFirstToken(), message));
24
24
  return;
25
25
  }
@@ -33,10 +33,12 @@ class SelectionScreen {
33
33
  input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(blockToken, input.filename, type, ["selection_screen_tab" /* IdentifierMeta.SelectionScreenTab */]));
34
34
  }
35
35
  else if (concat.startsWith("SELECTION-SCREEN TAB") && fieldName) {
36
- input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fieldName, input.filename, new basic_1.CharacterType(83), ["selection_screen_tab" /* IdentifierMeta.SelectionScreenTab */]));
36
+ const id = new _typed_identifier_1.TypedIdentifier(fieldName, input.filename, new basic_1.CharacterType(83), ["selection_screen_tab" /* IdentifierMeta.SelectionScreenTab */]);
37
+ input.scope.addNamedIdentifier(field.concatTokens(), id);
37
38
  }
38
39
  else if (fieldName) {
39
- input.scope.addIdentifier(new _typed_identifier_1.TypedIdentifier(fieldName, input.filename, new basic_1.CharacterType(83)));
40
+ const id = new _typed_identifier_1.TypedIdentifier(fieldName, input.filename, new basic_1.CharacterType(83));
41
+ input.scope.addNamedIdentifier(field.concatTokens(), id);
40
42
  }
41
43
  }
42
44
  }
@@ -60,6 +60,9 @@ class Data {
60
60
  return new _typed_identifier_1.TypedIdentifier(name, input.filename, found);
61
61
  }
62
62
  }
63
+ else if (found instanceof Basic.UnknownType) {
64
+ return new _typed_identifier_1.TypedIdentifier(name, input.filename, found);
65
+ }
63
66
  for (const c of found) {
64
67
  components.push(c);
65
68
  }
@@ -30,7 +30,7 @@ class Types {
30
30
  }
31
31
  else if (ctyp instanceof Statements.IncludeType) {
32
32
  const found = new include_type_1.IncludeType().runSyntax(c, input);
33
- if (found instanceof basic_1.VoidType) {
33
+ if (found instanceof basic_1.VoidType || found instanceof Basic.UnknownType) {
34
34
  voidd = found;
35
35
  }
36
36
  else {
@@ -66,6 +66,8 @@ const do_1 = require("./statements/do");
66
66
  const concatenate_1 = require("./statements/concatenate");
67
67
  const call_function_1 = require("./statements/call_function");
68
68
  const clear_1 = require("./statements/clear");
69
+ const refresh_1 = require("./statements/refresh");
70
+ const free_1 = require("./statements/free");
69
71
  const replace_1 = require("./statements/replace");
70
72
  const get_bit_1 = require("./statements/get_bit");
71
73
  const raise_1 = require("./statements/raise");
@@ -192,6 +194,8 @@ if (Object.keys(map).length === 0) {
192
194
  addToMap(new delete_internal_1.DeleteInternal());
193
195
  addToMap(new delete_cluster_1.DeleteCluster());
194
196
  addToMap(new clear_1.Clear());
197
+ addToMap(new free_1.Free());
198
+ addToMap(new refresh_1.Refresh());
195
199
  addToMap(new receive_1.Receive());
196
200
  addToMap(new get_bit_1.GetBit());
197
201
  addToMap(new class_local_friends_1.ClassLocalFriends());
@@ -67,7 +67,7 @@ class Registry {
67
67
  }
68
68
  static abaplintVersion() {
69
69
  // magic, see build script "version.sh"
70
- return "2.113.226";
70
+ return "2.113.228";
71
71
  }
72
72
  getDDICReferences() {
73
73
  return this.ddicReferences;
@@ -65,6 +65,10 @@ DATA END OF foo.`,
65
65
  if (t.getChildren().length !== 3) {
66
66
  continue;
67
67
  }
68
+ const data = t.findFirstStatement(Statements.DataBegin);
69
+ if (data === null || data === void 0 ? void 0 : data.findDirectTokenByText("OCCURS")) {
70
+ continue;
71
+ }
68
72
  if (t.findFirstStatement(Statements.IncludeType)) {
69
73
  const token = t.getFirstToken();
70
74
  const message = "DATA BEGIN with single INCLUDE";
@@ -71,6 +71,12 @@ class ObsoleteStatementConf extends _basic_rule_config_1.BasicRuleConfig {
71
71
  this.formDefinition = true;
72
72
  /** Check for FORM IMPLEMENTATION */
73
73
  this.formImplementation = true;
74
+ /** Check for COMMON PART */
75
+ this.commonPart = true;
76
+ /** Check for FIELD-GROUPS */
77
+ this.fieldGroups = true;
78
+ /** Check for REPLACE INTO */
79
+ this.replaceInto = true;
74
80
  }
75
81
  }
76
82
  exports.ObsoleteStatementConf = ObsoleteStatementConf;
@@ -182,10 +188,22 @@ ENDIF.`,
182
188
  const issue = issue_1.Issue.atStatement(file, staNode, "COMMUNICATION is obsolete", this.getMetadata().key, this.conf.severity);
183
189
  issues.push(issue);
184
190
  }
191
+ if (this.conf.commonPart && sta instanceof Statements.DataBegin && staNode.findDirectTokenByText("COMMON")) {
192
+ const issue = issue_1.Issue.atStatement(file, staNode, "COMMON PART is obsolete", this.getMetadata().key, this.conf.severity);
193
+ issues.push(issue);
194
+ }
195
+ if (this.conf.replaceInto && sta instanceof Statements.Replace && staNode.findDirectTokenByText("INTO")) {
196
+ const issue = issue_1.Issue.atStatement(file, staNode, "REPLACE INTO is obsolete", this.getMetadata().key, this.conf.severity);
197
+ issues.push(issue);
198
+ }
185
199
  if (this.conf.pack && sta instanceof Statements.Pack) {
186
200
  const issue = issue_1.Issue.atStatement(file, staNode, "PACK is obsolete", this.getMetadata().key, this.conf.severity);
187
201
  issues.push(issue);
188
202
  }
203
+ if (this.conf.fieldGroups && sta instanceof Statements.FieldGroup) {
204
+ const issue = issue_1.Issue.atStatement(file, staNode, "FIELD-GROUPS is obsolete", this.getMetadata().key, this.conf.severity);
205
+ issues.push(issue);
206
+ }
189
207
  if (this.conf.parameter && sta instanceof Statements.Parameter) {
190
208
  const token = staNode.getFirstToken();
191
209
  if (token.getStr().toUpperCase() === "PARAMETER") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abaplint/core",
3
- "version": "2.113.226",
3
+ "version": "2.113.228",
4
4
  "description": "abaplint - Core API",
5
5
  "main": "build/src/index.js",
6
6
  "typings": "build/abaplint.d.ts",
@@ -50,10 +50,10 @@
50
50
  },
51
51
  "homepage": "https://abaplint.org",
52
52
  "devDependencies": {
53
- "@microsoft/api-extractor": "^7.53.0",
53
+ "@microsoft/api-extractor": "^7.53.1",
54
54
  "@types/chai": "^4.3.20",
55
55
  "@types/mocha": "^10.0.10",
56
- "@types/node": "^24.6.2",
56
+ "@types/node": "^24.7.2",
57
57
  "chai": "^4.5.0",
58
58
  "eslint": "^9.37.0",
59
59
  "mocha": "^11.7.4",