Merge branch 'master' of https://github.com/Hackerpilot/Dscanner into HEAD

This commit is contained in:
Hackerpilot 2014-04-29 15:46:22 -07:00
commit 9722183249
3 changed files with 7 additions and 7 deletions

View File

@ -479,7 +479,7 @@ class XMLPrinter : ASTVisitor
override void visit(const ForStatement forStatement)
{
output.writeln("<forStatement>");
if (forStatement.declarationOrStatement !is null)
if (forStatement.initialization !is null)
{
output.writeln("<initialization>");
visit(forStatement.initialization);
@ -497,7 +497,8 @@ class XMLPrinter : ASTVisitor
visit(forStatement.increment);
output.writeln("</increment>");
}
visit(forStatement.declarationOrStatement);
if (forStatement.declarationOrStatement !is null)
visit(forStatement.declarationOrStatement);
output.writeln("</forStatement>");
}
@ -780,7 +781,7 @@ class XMLPrinter : ASTVisitor
output.writeln("</key>");
output.writeln("<value>");
visit(keyValuePair.value);
output.writeln("<value>");
output.writeln("</value>");
output.writeln("</keyValuePair>");
}

View File

@ -12,7 +12,7 @@ dmd\
analysis/*.d\
-version=DIP61\
-ofdscanner\
-m64 -g\
-g\
-O -release
#gdc\

View File

@ -325,7 +325,7 @@ alias core.sys.posix.stdio.fileno fileno;
* Parses an ArrayLiteral
*
* $(GRAMMAR $(RULEDEF arrayLiteral):
* $(LITERAL '[') ($(RULE assignExpression) ($(LITERAL ',') $(RULE assignExpression))*)? $(LITERAL ']')
* $(LITERAL '[') $(RULE argumentList)? $(LITERAL ']')
* ;)
*/
ArrayLiteral parseArrayLiteral()
@ -6263,8 +6263,7 @@ protected:
auto b = setBookmark();
scope(exit) goToBookmark(b);
advance();
Expression e = parseExpression();
return e !is null && currentIs(tok!":");
return !currentIs(tok!"]") && parseExpression() !is null && currentIs(tok!":");
}
bool hasMagicDelimiter(alias L, alias T)()