Fixed a bug, updated the README
This commit is contained in:
parent
954907325f
commit
20e575bdc2
|
@ -15,7 +15,7 @@ back to the client.
|
|||
* Autocompletion of __traits, scope, and extern arguments
|
||||
* Autocompletion of enums
|
||||
* Autocompletion of class, struct, and interface instances.
|
||||
* Display of call tips (but only for the first overload)
|
||||
* Display of call tips for functions and constructors
|
||||
* Not working:
|
||||
* Automatic starting of the server by the client
|
||||
* Windows support (I don't know that it won't work, but this program is not tested on Windows yet)
|
||||
|
|
|
@ -31,6 +31,7 @@ import std.conv;
|
|||
import actypes;
|
||||
import messages;
|
||||
import modulecache;
|
||||
import autocomplete;
|
||||
|
||||
class AutocompleteVisitor : ASTVisitor
|
||||
{
|
||||
|
@ -112,7 +113,7 @@ class AutocompleteVisitor : ASTVisitor
|
|||
s.name = member.name.value;
|
||||
s.location = member.name.startIndex;
|
||||
if (type is null)
|
||||
s.resolvedType = scope_.findSymbolInScope("int");
|
||||
s.resolvedType = scope_.findSymbolsInScope("int")[0];
|
||||
else
|
||||
s.type = type;
|
||||
if (parentSymbol !is null)
|
||||
|
@ -299,6 +300,7 @@ class AutocompleteVisitor : ASTVisitor
|
|||
override void visit(Module mod)
|
||||
{
|
||||
scope_ = new Scope(0, size_t.max);
|
||||
scope_.symbols ~= builtinSymbols;
|
||||
mod.accept(this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue