mirror of
https://github.com/dlang-community/D-Scanner.git
synced 2025-04-26 05:10:03 +03:00
Fix --ast crash on empty 'for' init decl/statement
This commit is contained in:
parent
bace5f0a76
commit
77418c8ab7
1 changed files with 6 additions and 3 deletions
|
@ -464,9 +464,12 @@ class XMLPrinter : ASTVisitor
|
|||
override void visit(ForStatement forStatement)
|
||||
{
|
||||
output.writeln("<forStatement>");
|
||||
output.writeln("<initialize>");
|
||||
visit(forStatement.declarationOrStatement);
|
||||
output.writeln("</initialize>");
|
||||
if (forStatement.declarationOrStatement !is null)
|
||||
{
|
||||
output.writeln("<initialize>");
|
||||
visit(forStatement.declarationOrStatement);
|
||||
output.writeln("</initialize>");
|
||||
}
|
||||
if (forStatement.test !is null)
|
||||
{
|
||||
output.writeln("<test>");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue