Fix segfault
This commit is contained in:
parent
ae46655c54
commit
64503a6801
|
|
@ -416,6 +416,8 @@ ACSymbol*[] getSymbolsByTokenChain(T)(Scope* completionScope,
|
|||
// tokens.map!stringToken);
|
||||
// Find the symbol corresponding to the beginning of the chain
|
||||
ACSymbol*[] symbols;
|
||||
if (tokens.length == 0)
|
||||
return [];
|
||||
if (tokens[0] == tok!"." && tokens.length > 1)
|
||||
{
|
||||
tokens = tokens[1 .. $];
|
||||
|
|
|
|||
|
|
@ -435,6 +435,7 @@ final class FirstPass : ASTVisitor
|
|||
Scope* s = allocate!Scope(semanticAllocator, feStatement.startIndex, bs.endLocation);
|
||||
s.parent = currentScope;
|
||||
currentScope.children.insert(s);
|
||||
currentScope = s;
|
||||
feExpression = feStatement.low.items[$ - 1];
|
||||
feStatement.accept(this);
|
||||
feExpression = null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue