fix #954
This commit is contained in:
parent
57bd23f83e
commit
cb7ea166f3
|
|
@ -771,7 +771,10 @@ namespace CodeFormatters
|
|||
continue;
|
||||
}
|
||||
}
|
||||
if (!(stmt is empty_statement))
|
||||
add_space_after = true;
|
||||
visit_node(stmt);
|
||||
|
||||
}
|
||||
DecOffset();
|
||||
if (!tmp_init_part)
|
||||
|
|
|
|||
|
|
@ -143,7 +143,18 @@ namespace PascalABCCompiler.SyntaxTree
|
|||
CompareInternal(left.expr, right.expr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void CompareInternal(assign_var_tuple left, assign_var_tuple right)
|
||||
{
|
||||
if (left == null && right != null || left != null && right == null)
|
||||
throw_not_equal(left, right);
|
||||
if (left != null && right != null)
|
||||
{
|
||||
CompareInternal(left.idents, right.idents);
|
||||
CompareInternal(left.expr, right.expr);
|
||||
}
|
||||
}
|
||||
|
||||
public void CompareInternal(loop_stmt left, loop_stmt right)
|
||||
{
|
||||
if (left == null && right != null || left != null && right == null)
|
||||
|
|
@ -1692,6 +1703,8 @@ namespace PascalABCCompiler.SyntaxTree
|
|||
CompareInternal(left as loop_stmt, right as loop_stmt);
|
||||
else if (left is assign_tuple)
|
||||
CompareInternal(left as assign_tuple, right as assign_tuple);
|
||||
else if (left is assign_var_tuple)
|
||||
CompareInternal(left as assign_var_tuple, right as assign_var_tuple);
|
||||
//else if (left is expression) // SSM 12/06/15
|
||||
// CompareInternal(left as expression, right as expression);
|
||||
|
||||
|
|
|
|||
1638
TestSuite/formatter_tests/input/GraphWPF.pas
Normal file
1638
TestSuite/formatter_tests/input/GraphWPF.pas
Normal file
File diff suppressed because it is too large
Load diff
4
TestSuite/formatter_tests/input/Program1200.pas
Normal file
4
TestSuite/formatter_tests/input/Program1200.pas
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
begin
|
||||
var b: byte;
|
||||
b += 1;b += 1;
|
||||
end.
|
||||
File diff suppressed because it is too large
Load diff
4
TestSuite/formatter_tests/should/Program1200.pas
Normal file
4
TestSuite/formatter_tests/should/Program1200.pas
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
begin
|
||||
var b: byte;
|
||||
b += 1; b += 1;
|
||||
end.
|
||||
Loading…
Reference in a new issue