Fix assoc array parsing

This commit is contained in:
Hackerpilot 2014-04-25 13:22:56 -07:00
parent b47b2edbc0
commit 18800b7832
1 changed files with 2 additions and 3 deletions

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()
@ -6258,8 +6258,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)()