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

[CodeCompletion] Propagate completion status of parseGenericArguments() #20960

Merged
merged 1 commit into from Dec 4, 2018

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Dec 3, 2018

To properly handle code-completion in generic argument list.

rdar://problem/39312854

To properly handle code-completion in generic argument list.

rdar://problem/39312854
@rintaro
Copy link
Member Author

rintaro commented Dec 3, 2018

@swift-ci Please smoke test

@@ -1207,9 +1207,9 @@ Parser::parseExprPostfixSuffix(ParserResult<Expr> Result, bool isExprBasic,
if (canParseAsGenericArgumentList()) {
SmallVector<TypeRepr *, 8> args;
SourceLoc LAngleLoc, RAngleLoc;
if (parseGenericArguments(args, LAngleLoc, RAngleLoc)) {
auto argStat = parseGenericArguments(args, LAngleLoc, RAngleLoc);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this status be incorporated into the ParserResult about to be returned?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, that's unreachable because canParseAsGenericArgumentList() fails if CC token is in it.

@@ -2259,9 +2259,9 @@ Expr *Parser::parseExprIdentifier() {
if (canParseAsGenericArgumentList()) {
SyntaxContext->createNodeInPlace(SyntaxKind::IdentifierExpr);
SyntaxContext->setCreateSyntax(SyntaxKind::SpecializeExpr);
if (parseGenericArguments(args, LAngleLoc, RAngleLoc)) {
auto argStat = parseGenericArguments(args, LAngleLoc, RAngleLoc);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@rintaro rintaro merged commit e944ea9 into apple:master Dec 4, 2018
@rintaro rintaro deleted the ide-completion-rdar39312854 branch December 4, 2018 04:03
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

Successfully merging this pull request may close these issues.

None yet

2 participants