Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ the issue.)
* *auto* declarations (Mostly)
* *with* statements
* Simple UFCS suggestions for concrete types and fundamental types.
* Dot chaining with other UFCS functions
* Not working:
* UFCS completion for templates, literals, aliased types, UFCS function arguments, and '.' chaining with other UFCS functions.
* UFCS completion for templates, literals, aliased types, UFCS function arguments.
* UFCS calltips
* Autocompletion of declarations with template arguments (This will work to some extent, but it won't do things like replace T with int)
* Determining the type of an enum member when no base type is specified, but the first member has an initializer
Expand Down
13 changes: 13 additions & 0 deletions dsymbol/src/dsymbol/conversion/first.d
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ final class FirstPass : ASTVisitor
currentSymbol.acSymbol.protection = protection.current;
currentSymbol.acSymbol.doc = makeDocumentation(dec.comment);
currentSymbol.acSymbol.qualifier = SymbolQualifier.func;
foreach (sc; dec.storageClasses)
{
if (sc.token.type == tok!"ref")
{
currentSymbol.acSymbol.returnIsRef = true;
break;
}
}

istring lastComment = this.lastComment;
this.lastComment = istring.init;
Expand Down Expand Up @@ -172,6 +180,11 @@ final class FirstPass : ASTVisitor
block.startLocation, null);
scope(exit) popSymbol();

if (exp.returnRefType == ReturnRefType.ref_)
{
currentSymbol.acSymbol.returnIsRef = true;
}

pushScope(block.startLocation, block.endLocation);
scope (exit) popScope();
processParameters(currentSymbol, exp.returnType,
Expand Down
5 changes: 4 additions & 1 deletion dsymbol/src/dsymbol/symbol.d
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ struct DSymbol
bool, "_flag8", 1,
bool, "_flag9", 1,
bool, "_flag10", 1,
uint, "", 3,
bool, "_flag11", 1,
uint, "", 2,
));
// dfmt on

Expand All @@ -463,6 +464,8 @@ struct DSymbol
alias parameterIsOut = _flag9;
/// Only valid for parameters: the parameter has storage class `in`
alias parameterIsIn = _flag10;
/// If the return type is a ref
alias returnIsRef = _flag11;

deprecated bool isPointer()
{
Expand Down
Loading
Loading