mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Completion] Support multiple parameter specifiers
Allow consuming any parameter specifiers ahead of the completion token when completion for the start of a function parameter type.
This commit is contained in:
@@ -1238,7 +1238,7 @@ public:
|
||||
if (next.isAny(tok::at_sign, tok::kw_inout, tok::l_paren,
|
||||
tok::identifier, tok::l_square, tok::kw_Any,
|
||||
tok::kw_Self, tok::kw__, tok::kw_var,
|
||||
tok::kw_let))
|
||||
tok::kw_let, tok::code_complete))
|
||||
return true;
|
||||
|
||||
if (next.is(tok::oper_prefix) && next.getText() == "~")
|
||||
@@ -1608,6 +1608,11 @@ public:
|
||||
/// Whether we are at the start of a parameter name when parsing a parameter.
|
||||
bool startsParameterName(bool isClosure);
|
||||
|
||||
/// Attempts to perform code completion for the possible start of a function
|
||||
/// parameter type, returning the source location of the consumed completion
|
||||
/// token, or a null location if there is no completion token.
|
||||
SourceLoc tryCompleteFunctionParamTypeBeginning();
|
||||
|
||||
/// Parse a parameter-clause.
|
||||
///
|
||||
/// \verbatim
|
||||
|
||||
Reference in New Issue
Block a user