added support for functions
This commit is contained in:
parent
0e2f50d6f9
commit
55b28fe898
|
|
@ -95,6 +95,7 @@ void secondPass(SemanticSymbol* currentSymbol, Scope* moduleScope, ref ModuleCac
|
||||||
moduleScope, cache);
|
moduleScope, cache);
|
||||||
break;
|
break;
|
||||||
case variableName:
|
case variableName:
|
||||||
|
case functionName:
|
||||||
if (currentSymbol.acSymbol.tmplArgNames.length > 0 && currentSymbol.acSymbol.type)
|
if (currentSymbol.acSymbol.tmplArgNames.length > 0 && currentSymbol.acSymbol.type)
|
||||||
{
|
{
|
||||||
auto tArgNames = currentSymbol.acSymbol.tmplArgNames;
|
auto tArgNames = currentSymbol.acSymbol.tmplArgNames;
|
||||||
|
|
@ -148,6 +149,13 @@ void resolveTemplate(DSymbol* sym, DSymbol* type, scope const istring[] tmplArgN
|
||||||
newPart.doc = part.doc;
|
newPart.doc = part.doc;
|
||||||
newPart.callTip = part.callTip;
|
newPart.callTip = part.callTip;
|
||||||
newPart.type = argSymbol;
|
newPart.type = argSymbol;
|
||||||
|
if (part.kind == CompletionKind.functionName)
|
||||||
|
{
|
||||||
|
if (part.type && part.type.kind == CompletionKind.typeTmpParam)
|
||||||
|
{
|
||||||
|
newPart.type = argSymbol;
|
||||||
|
}
|
||||||
|
}
|
||||||
newType.addChild(newPart, true);
|
newType.addChild(newPart, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -155,6 +163,7 @@ void resolveTemplate(DSymbol* sym, DSymbol* type, scope const istring[] tmplArgN
|
||||||
if (part.tmplArgNames.length > 0)
|
if (part.tmplArgNames.length > 0)
|
||||||
{
|
{
|
||||||
auto innerArg = part.tmplArgNames[0];
|
auto innerArg = part.tmplArgNames[0];
|
||||||
|
if (innerArg == currentT.name)
|
||||||
resolveTemplate(part, part.type, [argName], moduleScope, cache);
|
resolveTemplate(part, part.type, [argName], moduleScope, cache);
|
||||||
}
|
}
|
||||||
newType.addChild(part, false);
|
newType.addChild(part, false);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue