fix #1771
This commit is contained in:
parent
7dee3e135f
commit
e4f815c2be
|
|
@ -577,6 +577,12 @@ namespace CodeFormatters
|
|||
comm = "::";
|
||||
else if (comm.StartsWith("[") && comm.EndsWith(":"))
|
||||
comm = comm.Replace(" ", "");
|
||||
else if (comm.StartsWith("( ") && comm.TrimEnd().EndsWith("var"))
|
||||
comm = comm.Replace(" ", "")+" ";
|
||||
else if (trimed_comm.StartsWith(", ") && comm.TrimEnd().EndsWith("var"))
|
||||
comm = RemoveOverSpaces(comm);
|
||||
else if (trimed_comm.StartsWith(",var"))
|
||||
comm = ", var"+ trimed_comm.Replace(",var", "");
|
||||
else if (comm.StartsWith("array") || comm.StartsWith("set") || comm.StartsWith("sequence"))
|
||||
comm = RemoveOverSpaces(comm);
|
||||
else if ((comm.StartsWith("class") || comm.StartsWith("interface")) && comm.EndsWith("("))
|
||||
|
|
|
|||
7
TestSuite/formatter_tests/input/assigntuple1.pas
Normal file
7
TestSuite/formatter_tests/input/assigntuple1.pas
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
begin
|
||||
( var x , var y ) := ( 0 , 0 ) ;
|
||||
( var x , var y ,var z) := ( 0 , 0,2 ) ;
|
||||
(var x,var y) := (0,2);
|
||||
( var x,var y) := (0, 2);
|
||||
(x,y):=(1,2);
|
||||
end.
|
||||
7
TestSuite/formatter_tests/should/assigntuple1.pas
Normal file
7
TestSuite/formatter_tests/should/assigntuple1.pas
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
begin
|
||||
(var x, var y) := (0, 0);
|
||||
(var x, var y, var z) := (0, 0, 2);
|
||||
(var x, var y) := (0, 2);
|
||||
(var x, var y) := (0, 2);
|
||||
(x, y) := (1, 2);
|
||||
end.
|
||||
Loading…
Reference in a new issue