Fixed partial completion
This commit is contained in:
parent
f97add145d
commit
2635ec5c60
11
actypes.d
11
actypes.d
|
|
@ -172,12 +172,19 @@ struct Scope
|
||||||
return cast(typeof(return)) &this;
|
return cast(typeof(return)) &this;
|
||||||
}
|
}
|
||||||
|
|
||||||
ACSymbol*[] getSymbolsInCursorScope(size_t cursorPosition) const
|
const(ACSymbol)*[] getSymbolsInCursorScope(size_t cursorPosition) const
|
||||||
{
|
{
|
||||||
auto s = getScopeByCursor(cursorPosition);
|
auto s = getScopeByCursor(cursorPosition);
|
||||||
if (s is null)
|
if (s is null)
|
||||||
return [];
|
return [];
|
||||||
return cast(typeof(return)) s.symbols;
|
const(ACSymbol)*[] symbols = cast(typeof(return)) s.symbols;
|
||||||
|
Scope* sc = s.parent;
|
||||||
|
while (sc !is null)
|
||||||
|
{
|
||||||
|
symbols ~= sc.symbols;
|
||||||
|
sc = sc.parent;
|
||||||
|
}
|
||||||
|
return symbols;
|
||||||
}
|
}
|
||||||
|
|
||||||
const(ACSymbol)*[] getSymbolsByName(string name) const
|
const(ACSymbol)*[] getSymbolsByName(string name) const
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue