Fix: unary expression unexpected end, range violations

This commit is contained in:
Callum Anderson 2014-01-29 10:25:51 +11:00
parent 3df1324e9b
commit a8f888c436
1 changed files with 4 additions and 0 deletions

View File

@ -3523,6 +3523,8 @@ invariant() foo();
else
{
expect(tok!"new");
if (!moreTokens())
return null;
node.type = parseType();
if (currentIs(tok!"["))
{
@ -5651,6 +5653,8 @@ q{(int a, ...)
UnaryExpression parseUnaryExpression()
{
mixin(traceEnterAndExit!(__FUNCTION__));
if (!moreTokens())
return null;
auto node = new UnaryExpression;
switch (current.type)
{