Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete UnaryExpression for AutoDeclaration #482

Closed
ryuukk opened this issue Feb 8, 2023 · 2 comments
Closed

Incomplete UnaryExpression for AutoDeclaration #482

ryuukk opened this issue Feb 8, 2023 · 2 comments

Comments

@ryuukk
Copy link

ryuukk commented Feb 8, 2023

UnaryExpression from AutoDeclaration seems incomplete, it's all empty:

devenv_BsJaGyfbs0

There is a //TODO note in the code that indicates that it's WIP

This is blocking me for dlang-community/DCD#709

libdparse/src/dparse/ast.d

Lines 3427 to 3454 in 88f247e

final class UnaryExpression : ExpressionNode
{
override void accept(ASTVisitor visitor) const
{
// TODO prefix, postfix, unary
mixin (visitIfNotNull!(primaryExpression, newExpression, deleteExpression,
castExpression, functionCallExpression, argumentList, unaryExpression,
type, identifierOrTemplateInstance, assertExpression, throwExpression,
indexExpression));
}
/** */ Type type;
/** */ PrimaryExpression primaryExpression;
/** */ Token prefix;
/** */ Token suffix;
/** */ UnaryExpression unaryExpression;
/** */ NewExpression newExpression;
/** */ DeleteExpression deleteExpression;
/** */ CastExpression castExpression;
/** */ FunctionCallExpression functionCallExpression;
/** */ ArgumentList argumentList;
/** */ IdentifierOrTemplateInstance identifierOrTemplateInstance;
/** */ AssertExpression assertExpression;
/** */ ThrowExpression throwExpression;
/** */ IndexExpression indexExpression;
/** */ size_t dotLocation;
mixin OpEquals;
}

@ryuukk ryuukk changed the title Incomplete UnaryExpression Incomplete UnaryExpression for AutoDeclaration Feb 8, 2023
@WebFreak001
Copy link
Member

what code are you trying to parse? In your debugger screenshot it seems like functionCallExpression is set, so it doesn't seem invalid to me at first glance at least.

@WebFreak001
Copy link
Member

closing due to missing information / screenshot not showing what the error is - this is likely just that the information is elsewhere than in the UnaryExpression, but I don't know what it should be.

If you don't find the information, please reopen and post what code you are trying to parse that doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants