Merge branch 'master' of https://github.com/Hackerpilot/Dscanner
This commit is contained in:
commit
ae9ff77242
|
@ -592,7 +592,8 @@ class XMLPrinter : ASTVisitor
|
|||
{
|
||||
output.writeln("<gotoStatement>");
|
||||
output.writeln("<case>");
|
||||
visit(gotoStatement.expression);
|
||||
if (gotoStatement.expression)
|
||||
visit(gotoStatement.expression);
|
||||
output.writeln("</case>");
|
||||
output.writeln("</gotoStatement>");
|
||||
}
|
||||
|
|
|
@ -2302,6 +2302,8 @@ public:
|
|||
mixin (visitIfNotNull!(expression));
|
||||
}
|
||||
/** */ Expression expression;
|
||||
/** */ size_t startLocation;
|
||||
/** */ size_t endLocation;
|
||||
mixin OpEquals;
|
||||
}
|
||||
|
||||
|
|
|
@ -4425,10 +4425,14 @@ q{(int a, ...)
|
|||
{
|
||||
mixin(traceEnterAndExit!(__FUNCTION__));
|
||||
auto node = allocate!ReturnStatement;
|
||||
if (expect(tok!"return") is null) return null;
|
||||
auto start = expect(tok!"return");
|
||||
if (start is null) return null;
|
||||
node.startLocation = start.index;
|
||||
if (!currentIs(tok!";"))
|
||||
node.expression = parseExpression();
|
||||
if (expect(tok!";") is null) return null;
|
||||
auto semicolon = expect(tok!";");
|
||||
if (semicolon is null) return null;
|
||||
node.endLocation = semicolon.index;
|
||||
return node;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue