Merge pull request #88 from callumenator/unaryfix
Fix: unary expression unexpected end, range violations
This commit is contained in:
commit
8bf1f5b36f
|
@ -3523,6 +3523,8 @@ invariant() foo();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
expect(tok!"new");
|
expect(tok!"new");
|
||||||
|
if (!moreTokens())
|
||||||
|
return null;
|
||||||
node.type = parseType();
|
node.type = parseType();
|
||||||
if (currentIs(tok!"["))
|
if (currentIs(tok!"["))
|
||||||
{
|
{
|
||||||
|
@ -5651,6 +5653,8 @@ q{(int a, ...)
|
||||||
UnaryExpression parseUnaryExpression()
|
UnaryExpression parseUnaryExpression()
|
||||||
{
|
{
|
||||||
mixin(traceEnterAndExit!(__FUNCTION__));
|
mixin(traceEnterAndExit!(__FUNCTION__));
|
||||||
|
if (!moreTokens())
|
||||||
|
return null;
|
||||||
auto node = new UnaryExpression;
|
auto node = new UnaryExpression;
|
||||||
switch (current.type)
|
switch (current.type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue