ASTPrinter: Support empty goto case;
support goto case; with out an expression. currently running dscanner --ast std/d/parser.d fails with a segfault
This commit is contained in:
parent
3a78e4b937
commit
fb6116c041
|
@ -592,7 +592,9 @@ class XMLPrinter : ASTVisitor
|
|||
{
|
||||
output.writeln("<gotoStatement>");
|
||||
output.writeln("<case>");
|
||||
visit(gotoStatement.expression);
|
||||
if (gotoStatement.expression) {
|
||||
visit(gotoStatement.expression);
|
||||
}
|
||||
output.writeln("</case>");
|
||||
output.writeln("</gotoStatement>");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue