Fixed null pointer error
This commit is contained in:
parent
575e75fc91
commit
d5689dd1ac
12
astprinter.d
12
astprinter.d
|
@ -215,12 +215,18 @@ class XMLPrinter : ASTVisitor
|
||||||
override void visit(CaseRangeStatement caseRangeStatement)
|
override void visit(CaseRangeStatement caseRangeStatement)
|
||||||
{
|
{
|
||||||
output.writeln("<caseRangeStatement>");
|
output.writeln("<caseRangeStatement>");
|
||||||
|
if (caseRangeStatement.low !is null)
|
||||||
|
{
|
||||||
output.writeln("<low>");
|
output.writeln("<low>");
|
||||||
visit(caseRangeStatement.low);
|
visit(caseRangeStatement.low);
|
||||||
output.writeln("</low>");
|
output.writeln("</low>");
|
||||||
|
}
|
||||||
|
if (caseRangeStatement.high !is null)
|
||||||
|
{
|
||||||
output.writeln("<high>");
|
output.writeln("<high>");
|
||||||
visit(caseRangeStatement.high);
|
visit(caseRangeStatement.high);
|
||||||
output.writeln("</high>");
|
output.writeln("</high>");
|
||||||
|
}
|
||||||
if (caseRangeStatement.declarationsAndStatements !is null)
|
if (caseRangeStatement.declarationsAndStatements !is null)
|
||||||
visit(caseRangeStatement.declarationsAndStatements);
|
visit(caseRangeStatement.declarationsAndStatements);
|
||||||
output.writeln("</caseRangeStatement>");
|
output.writeln("</caseRangeStatement>");
|
||||||
|
@ -1329,13 +1335,15 @@ class XMLPrinter : ASTVisitor
|
||||||
|
|
||||||
override void visit(Type2 type2)
|
override void visit(Type2 type2)
|
||||||
{
|
{
|
||||||
output.writeln("<type2>");
|
|
||||||
if (type2.builtinType != tok!"")
|
if (type2.builtinType != tok!"")
|
||||||
output.writeln(str(type2.builtinType));
|
output.writeln("<type2>", str(type2.builtinType), "</type2>");
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
output.writeln("<type2>");
|
||||||
type2.accept(this);
|
type2.accept(this);
|
||||||
output.writeln("</type2>");
|
output.writeln("</type2>");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override void visit(TypeSpecialization typeSpecialization)
|
override void visit(TypeSpecialization typeSpecialization)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue