Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
{
"category": 1,
"message": "{\"jsonrpc\":\"2.0\",\"id\":\"1\",\"result\":{\"csvResult\":{\"root\":\"TCOZEFR0\",\"header\":\"LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length\",\"rows\":[\"12;0;1;FILLER;GROUP;1;81;81\",\"12;1;2;FILLER (1);GROUP OCCURS 1;1;81;81\",\"13;2;5;Array1 (1 1);GROUP OCCURS 9;1;81;81\",\"14;3;10;Var1 (1 1);PIC X;1;1;1\",\"15;3;10;Array2 (1 1 1);GROUP OCCURS 8;2;9;8\",\"16;4;15;Var2 (1 1 1);PIC X;2;2;1\",\"17;0;1;FILLER;GROUP;1;4;4\",\"18;1;5;GRP-REDEFINED;GROUP;1;3;3\",\"19;2;10;VAR-1;PIC 9(05) COMP-3;1;3;3\",\"20;1;5;FILLER;GROUP REDEFINES GRP-REDEFINED;1;3;3\",\"21;2;10;VAR-RED1;PIC 9(05) COMP-3;1;3;3\",\"22;1;5;GROUP-WITH-88-1;GROUP;4;4;1\",\"23;2;10;GROUP-WITH-88-2;PIC 9(01);4;4;1\",\"28;0;1;Var1-in-ls;PIC XX;1;2;2\",\"29;0;1;num1;PIC 9(03);1;3;3\",\"30;0;1;num2;comp-1;1;4;4\",\"31;0;1;num3;comp-2;1;8;8\",\"32;0;1;num4;PIC 9(03) comp-3;1;2;2\",\"33;0;1;num5;PIC 9(03) comp-4;1;2;2\",\"34;0;1;num6;PIC 9(03) comp-5;1;2;2\",\"35;0;1;num7;PIC 9(03) packed-decimal;1;2;2\",\"36;0;1;num8;PIC 9(03) binary;1;2;2\",\"37;0;1;num9;PIC 9(03) comp;1;2;2\"],\"separator\":\";\"}}}"
"message": "{\"jsonrpc\":\"2.0\",\"id\":\"1\",\"result\":{\"csvResult\":{\"root\":\"TCOZEFR0\",\"expandedRowsCount\":181,\"header\":\"LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length\",\"rows\":[\"12;0;1;FILLER;GROUP;1;81;81\",\"12;1;2;FILLER (1);GROUP OCCURS 1;1;81;81\",\"13;2;5;Array1 (1 1);GROUP OCCURS 9;1;81;81\",\"14;3;10;Var1 (1 1);PIC X;1;1;1\",\"15;3;10;Array2 (1 1 1);GROUP OCCURS 8;2;9;8\",\"16;4;15;Var2 (1 1 1);PIC X;2;2;1\",\"17;0;1;FILLER;GROUP;1;4;4\",\"18;1;5;GRP-REDEFINED;GROUP;1;3;3\",\"19;2;10;VAR-1;PIC 9(05) COMP-3;1;3;3\",\"20;1;5;FILLER;GROUP REDEFINES GRP-REDEFINED;1;3;3\",\"21;2;10;VAR-RED1;PIC 9(05) COMP-3;1;3;3\",\"22;1;5;GROUP-WITH-88-1;GROUP;4;4;1\",\"23;2;10;GROUP-WITH-88-2;PIC 9(01);4;4;1\",\"28;0;1;Var1-in-ls;PIC XX;1;2;2\",\"29;0;1;num1;PIC 9(03);1;3;3\",\"30;0;1;num2;comp-1;1;4;4\",\"31;0;1;num3;comp-2;1;8;8\",\"32;0;1;num4;PIC 9(03) comp-3;1;2;2\",\"33;0;1;num5;PIC 9(03) comp-4;1;2;2\",\"34;0;1;num6;PIC 9(03) comp-5;1;2;2\",\"35;0;1;num7;PIC 9(03) packed-decimal;1;2;2\",\"36;0;1;num8;PIC 9(03) binary;1;2;2\",\"37;0;1;num9;PIC 9(03) comp;1;2;2\"],\"separator\":\";\"}}}"
},
{
"category": 0,
Expand All @@ -51,7 +51,7 @@
},
{
"category": 1,
"message": "{\"jsonrpc\":\"2.0\",\"id\":\"2\",\"result\":{\"csvResult\":{\"root\":\"TCOZEFR0\",\"header\":\"LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length\",\"rows\":[\"12;0;1;FILLER;GROUP;1;81;81\",\"12;1;2;FILLER (1);GROUP OCCURS 1;1;81;81\",\"13;2;5;Array1 (1 1);GROUP OCCURS 9;1;81;81\",\"14;3;10;Var1 (1 1);PIC X;1;1;1\",\"15;3;10;Array2 (1 1 1);GROUP OCCURS 8;2;9;8\",\"16;4;15;Var2 (1 1 1);PIC X;2;2;1\",\"17;0;1;FILLER;GROUP;1;4;4\",\"18;1;5;GRP-REDEFINED;GROUP;1;3;3\",\"19;2;10;VAR-1;PIC 9(05) COMP-3;1;3;3\",\"21;1;5;GROUP-WITH-88-1;GROUP;4;4;1\",\"22;2;10;GROUP-WITH-88-2;PIC 9(01);4;4;1\",\"27;0;1;Var1-in-ls;PIC XX;1;2;2\",\"28;0;1;num1;PIC 9(03);1;3;3\",\"29;0;1;num2;comp-1;1;4;4\",\"30;0;1;num3;comp-2;1;8;8\",\"31;0;1;num4;PIC 9(03) comp-3;1;2;2\",\"32;0;1;num5;PIC 9(03) comp-4;1;2;2\",\"33;0;1;num6;PIC 9(03) comp-5;1;2;2\",\"34;0;1;num7;PIC 9(03) packed-decimal;1;2;2\",\"35;0;1;num8;PIC 9(03) binary;1;2;2\",\"36;0;1;num9;PIC 9(03) comp;1;2;2\"],\"separator\":\";\"}}}"
"message": "{\"jsonrpc\":\"2.0\",\"id\":\"2\",\"result\":{\"csvResult\":{\"root\":\"TCOZEFR0\",\"expandedRowsCount\":179,\"header\":\"LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length\",\"rows\":[\"12;0;1;FILLER;GROUP;1;81;81\",\"12;1;2;FILLER (1);GROUP OCCURS 1;1;81;81\",\"13;2;5;Array1 (1 1);GROUP OCCURS 9;1;81;81\",\"14;3;10;Var1 (1 1);PIC X;1;1;1\",\"15;3;10;Array2 (1 1 1);GROUP OCCURS 8;2;9;8\",\"16;4;15;Var2 (1 1 1);PIC X;2;2;1\",\"17;0;1;FILLER;GROUP;1;4;4\",\"18;1;5;GRP-REDEFINED;GROUP;1;3;3\",\"19;2;10;VAR-1;PIC 9(05) COMP-3;1;3;3\",\"21;1;5;GROUP-WITH-88-1;GROUP;4;4;1\",\"22;2;10;GROUP-WITH-88-2;PIC 9(01);4;4;1\",\"27;0;1;Var1-in-ls;PIC XX;1;2;2\",\"28;0;1;num1;PIC 9(03);1;3;3\",\"29;0;1;num2;comp-1;1;4;4\",\"30;0;1;num3;comp-2;1;8;8\",\"31;0;1;num4;PIC 9(03) comp-3;1;2;2\",\"32;0;1;num5;PIC 9(03) comp-4;1;2;2\",\"33;0;1;num6;PIC 9(03) comp-5;1;2;2\",\"34;0;1;num7;PIC 9(03) packed-decimal;1;2;2\",\"35;0;1;num8;PIC 9(03) binary;1;2;2\",\"36;0;1;num9;PIC 9(03) comp;1;2;2\"],\"separator\":\";\"}}}"
}
],
"didClose": "{\"jsonrpc\":\"2.0\",\"method\":\"textDocument/didClose\",\"params\":{\"textDocument\":{\"uri\":\"file:/C:/Users/GDLRUSER/workspaces/runtime-CobolEditorEI/RemoteSystemsTempFiles/FttRemoteTempFiles/nitcpip.e-i.net/ZZ/ZZ.DY530.ZGEN.SOURCE.TST2.PERM/TCOZEFR0.cbl\"}}}",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{"line":1,"character":12}
---------------------------------------------------------------------------------
copy
7
LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length
1;0;1;TCOQLF;GROUP;1;6;6
2;1;5;TCOQLF-Var1;PIC X;1;1;1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{"line":0,"character":0}
---------------------------------------------------------------------------------
copy
7
LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length
1;0;1;TCOQLF;GROUP;1;6;6
2;1;5;TCOQLF-Var1;PIC X;1;1;1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{"line":2,"character":8}
---------------------------------------------------------------------------------
copyWithout01
3
LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length
2;1;5;Var1;PIC X;1;1;1
3;1;5;Var2;PIC X;2;2;1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{"line":0,"character":0}
---------------------------------------------------------------------------------
copyWithout01
3
LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length
2;1;5;Var1;PIC X;1;1;1
3;1;5;Var2;PIC X;2;2;1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{"line":0,"character":0}
---------------------------------------------------------------------------------
empty
0
LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{"line":10,"character":12}
---------------------------------------------------------------------------------
MAINPGM
2
LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length
6;0;1;main-group;GROUP;1;1;1
7;1;5;main-var;PIC X;1;1;1
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{"line":10,"character":12}
---------------------------------------------------------------------------------
TCOZEFR3
395593
LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length
12;0;1;included-copy;GROUP;1;5;5
12;1;2;root-included;GROUP;1;5;5
12;2;5;grp-included;GROUP;1;5;5
12;3;10;var-included-1;PIC X;1;1;1
12;3;10;FILLER;PIC X;2;2;1
12;3;10;var-included-occ (1);PIC X OCCURS 3;3;5;3
12;2;5;grp-included-redef;GROUP REDEFINES grp-included;1;5;5
12;3;10;var-included-2;PIC X(5);1;5;5
13;0;1;grp-root;GROUP;1;263503;263503
14;1;5;grp-simple;GROUP;1;2;2
15;2;10;var-simple;PIC X;1;1;1
16;2;10;var-simple-redef;PIC X REDEFINES var-simple;1;1;1
17;2;10;grp-target;GROUP;2;2;1
18;3;15;var1;PIC X;2;2;1
19;2;10;grp-redef;GROUP REDEFINES grp-target;2;2;1
20;3;15;var2;PIC X;2;2;1
21;1;5;grp-dim;GROUP;3;1312;1310
22;2;10;grp-one-dim (1);GROUP OCCURS 10;3;1312;1310
23;3;15;var-one-dim (1);PIC X;3;3;1
24;3;15;var-one-dim-redef (1);PIC X REDEFINES var-one-dim;3;3;1
25;3;15;grp-two-dim (1 1);GROUP OCCURS 10;4;113;110
26;4;20;var-two-dim (1 1);PIC X;4;4;1
27;4;20;grp-three-dim (1 1 1);GROUP OCCURS 10;5;14;10
28;5;25;var-three-dim (1 1 1);PIC X;5;5;1
29;3;15;var-inline-two-dim (1 1);PIC X(2) OCCURS 10;114;133;20
30;1;5;grp-picture;GROUP;1313;1328;16
31;2;10;var-x;PIC xx;1313;1314;2
32;2;10;var-9;PIC 9(2);1315;1316;2
33;2;10;var-national;PIC N(2)N;1317;1322;6
34;2;10;var-national-edited;PIC BN;1323;1326;4
35;2;10;FILLER;PIC X;1327;1327;1
36;2;10;FILLER;PIC 9;1328;1328;1
37;1;5;grp-picture-not-displayable;GROUP;1329;1334;6
38;2;10;FILLER;PIC N;1329;1330;2
39;2;10;FILLER;PIC BN;1331;1334;4
40;1;5;grp-usage;GROUP;1335;1344;10
41;2;10;var-none;PIC X;1335;1335;1
42;2;10;var-display;PIC X DISPLAY;1336;1336;1
43;2;10;var-comp;PIC 9 COMP;1337;1338;2
44;2;10;var-comp5;PIC 9 COMP-5;1339;1340;2
45;2;10;var-pointer;POINTER;1341;1344;4
46;1;5;grp-usage-not-displayable;GROUP;1345;1360;16
47;2;10;var-index;INDEX;1345;1348;4
48;2;10;var-index-redef;INDEX REDEFINES var-index;1345;1348;4
49;2;10;var-function-pointer;FUNCTION-POINTER;1349;1352;4
50;2;10;var-procedure-pointer;PROCEDURE-POINTER;1353;1360;8
51;1;5;var-occurs (1);PIC X OCCURS 65535;1361;66895;65535
52;1;5;var-occurs-not-displayable (1);PIC X OCCURS 65536;66896;132431;65536
53;1;5;grp-occurs-not-displayable (1);GROUP OCCURS 65536;132432;263503;131072
54;2;10;var1-not-displayable (1);PIC X;132432;132432;1
55;2;10;grp1-not-displayable (1);GROUP;132433;132433;1
56;3;15;var2-not-displayable (1);PIC X;132433;132433;1
58;0;1;FILLER;PIC X;1;1;1
59;0;1;FILLER;GROUP;1;4;4
60;1;5;FILLER;PIC X;1;1;1
61;1;5;FILLER;GROUP;2;4;3
62;2;10;FILLER;PIC X;2;2;1
63;2;10;FILLER;GROUP;3;4;2
64;3;15;FILLER;PIC X;3;3;1
65;3;15;var-displayable;PIC X;4;4;1
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{"line":20,"character":12}
---------------------------------------------------------------------------------
Nested0
2
LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length
20;0;1;Nested0-group;GROUP;1;1;1
21;1;5;Nested0-var;PIC X;1;1;1
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{"line":10,"character":12}
---------------------------------------------------------------------------------
TCOZEFR0
182
LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length
12;0;1;FILLER;GROUP;1;81;81
12;1;2;FILLER (1);GROUP OCCURS 1;1;81;81
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{"line":0,"character":0}
---------------------------------------------------------------------------------
TCOZEFR0
182
LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length
12;0;1;FILLER;GROUP;1;81;81
12;1;2;FILLER (1);GROUP OCCURS 1;1;81;81
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{"line":33,"character":12}
---------------------------------------------------------------------------------
Stacked1
2
LineNumber;NodeLevel;LevelNumber;VariableName;PictureTypeOrUsage;Start;End;Length
34;0;1;Stacked1-group;GROUP;1;1;1
35;1;5;Stacked1-var;PIC X;1;1;1
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ protected override string GetActualResult(CompilationUnit compilationUnit, Posit
// Build actual result
var actual = new StringBuilder();
actual.AppendLine(processorResult.Root);
actual.AppendLine(processorResult.ExpandedRowsCount.ToString());
actual.AppendLine(processorResult.Header);
foreach (var row in processorResult.Rows)
{
Expand Down Expand Up @@ -65,5 +66,8 @@ protected override string GetActualResult(CompilationUnit compilationUnit, Posit

[TestMethod]
public void NestedPgm() => ExecuteTest("stackedAndNestedPgm");

[TestMethod]
public void MiscPgm() => ExecuteTest("miscPgm");
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"csvResult": {
"header": "col1;col2;col3",
"rows": [
"name1;9;data1",
"name2;456;data2",
"name2;-8;data3"
],
"separator": ";"
}
"csvResult": {
"expandedRowsCount": 3,
"header": "col1;col2;col3",
"rows": [
"name1;9;data1",
"name2;456;data2",
"name2;-8;data3"
],
"separator": ";"
}
}
54 changes: 43 additions & 11 deletions TypeCobol.LanguageServer/Processor/DataLayoutProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ public class DataLayoutProcessor
/// <param name="compilationUnit">Compilation unit resulting from parsing the Copy or Program</param>
/// <param name="position">Position determining the data to be considered (useful in case of the stacked/nested Programs)</param>
/// <param name="separator">Separator for fields to use</param>
/// <returns>Tuple made of the root (the Copy or the Program containing the data), CSV header and CSV rows</returns>
public (string Root, string Header, string[] Rows) GetDataLayoutAsCSV(CompilationUnit compilationUnit, Position position, string separator)
/// <returns>Tuple made of the root (the Copy or the Program containing the data), the rows count when all OCCURS are expanded, the CSV header and CSV rows</returns>
public (string Root, long ExpandedRowsCount, string Header, string[] Rows) GetDataLayoutAsCSV(CompilationUnit compilationUnit, Position position, string separator)
{
var rows = new List<string>();
var row = new StringBuilder();
var rootDLN = CollectDataLayoutNodesAtPosition(compilationUnit, position, ConvertToRow);
var (rootDLN, expandedRowsCount) = CollectDataLayoutNodesAtPosition(compilationUnit, position, ConvertToRow);
var root = rootDLN.Name;

string header = $"LineNumber{separator}NodeLevel{separator}LevelNumber{separator}VariableName{separator}PictureTypeOrUsage{separator}Start{separator}End{separator}Length";
return (root, header, rows.ToArray());
return (root, expandedRowsCount, header, rows.ToArray());

void ConvertToRow(DataLayoutNode dataLayoutNode)
{
Expand Down Expand Up @@ -91,20 +91,20 @@ object GetEnd()
/// <returns>Root data layout node</returns>
public DataLayoutNode GetDataLayoutAsTree(CompilationUnit compilationUnit, Position position)
{
return CollectDataLayoutNodesAtPosition(compilationUnit, position, null);
return CollectDataLayoutNodesAtPosition(compilationUnit, position, null).rootDLN;
}

private DataLayoutNode CollectDataLayoutNodesAtPosition(CompilationUnit compilationUnit, Position position, Action<DataLayoutNode> convert)
private (DataLayoutNode rootDLN, long expandedRowsCount) CollectDataLayoutNodesAtPosition(CompilationUnit compilationUnit, Position position, Action<DataLayoutNode> convert)
{
var program = GetProgram(compilationUnit, position);
if (program == null)
{
// Could not find target program, return empty node
return new()
// Could not find target program, return empty node and expanded rows count = 0
return (new()
{
Name = compilationUnit.TextSourceInfo.Name,
children = []
};
}, 0);
}

return CollectInProgram(program, convert);
Expand Down Expand Up @@ -146,8 +146,20 @@ private static Program GetProgram(CompilationUnit compilationUnit, Position posi
return program;
}

private DataLayoutNode CollectInProgram(Program program, Action<DataLayoutNode> convert)
private (DataLayoutNode rootDLN, long expandedRowsCount) CollectInProgram(Program program, Action<DataLayoutNode> convert)
{
// Counting rows when OCCURS are expanded:
// If a node is an OCCURS, it is counted as many times as its max OCCURS
// And/or if a node is included in one or several OCCURS, it is counted as many times as the product of the cumulative max OCCURS
// Otherwise, it is counted as one
// Note: an OCCURS with the UNBOUNDED clause is also counted as one
// For example an OCCURS 5 included in an OCCURS 10 contains:
// data1 -> data1 should be counted 5*10=50 times
// data2 which is an OCCURS 2 -> data2 should be counted 5*10*2=100 times
Comment thread
efr15 marked this conversation as resolved.
long expandedRowsCount = 0;
// Product of the cumulative max OCCURS (as long as an OCCURS is ongoing)
long occursCumulativeProduct = 1;

var rootDLN = DataLayoutNodeBuilder.From(program);

DataDivision dataDivision = program.Children.OfType<DataDivision>().FirstOrDefault();
Expand All @@ -173,7 +185,7 @@ void CollectInSection(DataSection dataSection, int index)
}
}

return rootDLN;
return (rootDLN, expandedRowsCount);

void CollectDataLayoutNodes(Node parentNode, DataLayoutNode parentDLN)
{
Expand All @@ -183,6 +195,20 @@ void CollectDataLayoutNodes(Node parentNode, DataLayoutNode parentDLN)
if (child is DataDefinition childDefinition && IsInScope(childDefinition))
{
var childDLN = DataLayoutNodeBuilder.From(childDefinition, parentDLN, i);

// Ignore Generated 01 in expanded rows count
bool generated = childDLN.Flags.HasFlag(DataLayoutNodeFlags.Generated);
if (!generated)
{
if (childDefinition.IsTableOccurence)
{
// Add max OCCURS in cumulative product
occursCumulativeProduct *= childDefinition.MaxOccurencesCount;
}

expandedRowsCount += occursCumulativeProduct;
}

parentDLN.children.Add(childDLN);

convert?.Invoke(childDLN);
Expand All @@ -191,6 +217,12 @@ void CollectDataLayoutNodes(Node parentNode, DataLayoutNode parentDLN)
{
CollectDataLayoutNodes(child, childDLN);
}

if (!generated && childDefinition.IsTableOccurence)
{
// Remove max OCCURS from cumulative product
occursCumulativeProduct /= childDefinition.MaxOccurencesCount;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ public class GetDataLayoutCSVResult
/// </summary>
public string root { get; set; }

/// <summary>
/// The rows count when all OCCURS are expanded
/// </summary>
public long expandedRowsCount { get; set; }

/// <summary>
/// The table header
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ protected virtual GetDataLayoutResult OnDidReceiveGetDataLayout(GetDataLayoutPar
var csvResult = new GetDataLayoutCSVResult()
{
root = result.Root,
expandedRowsCount = result.ExpandedRowsCount,
header = result.Header,
rows = result.Rows,
separator = SEPARATOR
Expand Down
4 changes: 2 additions & 2 deletions TypeCobol.LanguageServer/Workspace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,8 @@ private void FinalCompilationStepCompleted(Uri fileUri, CompilationUnit compilat
/// <param name="compilationUnit">Compilation unit resulting from parsing the Copy or Program</param>
/// <param name="position">Position determining the data to be considered (useful in case of the stacked/nested Programs)</param>
/// <param name="separator">Separator for fields to use</param>
/// <returns>Tuple made of the root (the Copy or the Program containing the data), CSV header and CSV rows</returns>
public (string Root, string Header, string[] Rows) GetDataLayoutAsCSV(CompilationUnit compilationUnit, VsCodeProtocol.Position position, string separator)
/// <returns>Tuple made of the root (the Copy or the Program containing the data), the rows count when all OCCURS are expanded, the CSV header and CSV rows</returns>
public (string Root, long ExpandedRowsCount, string Header, string[] Rows) GetDataLayoutAsCSV(CompilationUnit compilationUnit, VsCodeProtocol.Position position, string separator)
{
return _dataLayoutProcessor.GetDataLayoutAsCSV(compilationUnit, position, separator);
}
Expand Down
Loading