Skip to content

Commit

Permalink
bugfix attribute param completion
Browse files Browse the repository at this point in the history
  • Loading branch information
sekiguchi-nagisa committed Sep 14, 2023
1 parent 49d3a8b commit fd49381
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2504,7 +2504,6 @@ std::unique_ptr<Node> Parser::parse_attributes() {
}
if (this->inCompletionPointAt(TokenKind::ATTR_NAME)) {
this->makeCodeComp(CodeCompNode::ATTR_PARAM, std::move(attrNode), this->curToken);
return nullptr;
}
auto paramName = TRY(this->expectName(TokenKind::ATTR_NAME, &Lexer::toName));
TRY(this->expect(TokenKind::ATTR_ASSIGN));
Expand Down
5 changes: 4 additions & 1 deletion test/exec/cases/base/builtin_complete3.ds
Original file line number Diff line number Diff line change
Expand Up @@ -169,4 +169,7 @@ $assertArray(['[<', 'let', 'typedef', 'var'], $(complete '[< CLI >] '))
$assertArray(['help', 'long', 'required', 'short', 'stop', 'store'], $(complete '[< Flag('))
$assertArray(['help', 'long', 'short', 'stop', ], $(complete '
[< Flag(required: $true, store: $false, '))
$assertArray(['short', 'stop', 'store'], $(complete '[< Flag(s'))
$assertArray(['short', 'stop', 'store'], $(complete '[< Flag(s'))
$assertArray(["long"], $(complete '
[<CLI>] typedef BBB() {[<Flag(short: "d",
lo'))

0 comments on commit fd49381

Please sign in to comment.