[svn]
r7570: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel:
Project.MakeCompletionL...
VladD2
svnadmin at nemerle.org
Mon Apr 2 06:42:14 CEST 2007
Log:
Add support keywords: mutable, def, array, true, false, null in expressions.
Author: VladD2
Date: Mon Apr 2 06:42:13 2007
New Revision: 7570
Modified:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.MakeCompletionList.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.MakeCompletionList.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.MakeCompletionList.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.MakeCompletionList.n Mon Apr 2 06:42:13 2007
@@ -13,7 +13,7 @@
{
public partial class Engine
{
- public static MakeCompletionList(result : CompletionResult) : array[CompletionElem]
+ internal static MakeCompletionList(result : CompletionResult, inExpr : bool = false) : array[CompletionElem]
{
def overloadsMap = Hashtable.[string, SCG.List[Elem]]();
def completionList = SCG.List();
@@ -86,6 +86,15 @@
}
}
+ when (inExpr)
+ {
+ def add(keyword)
+ { completionList.Add(CompletionElem(GlyphType.Snippet :> int, keyword, "keyword", null)); }
+
+ def keywords = array["mutable", "def", "array", "true", "false", "null"];
+ keywords.FilterLazy(_.StartsWithIgnoreCace(result.NamePrefix)).Iter(add);
+ }
+
//TODO: Поправить комплейшон для конструкторов.
completionList.ToArray()
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/Project.Type.n Mon Apr 2 06:42:13 2007
@@ -49,7 +49,7 @@
TopKeywords
}
else
- Engine.MakeCompletionList(result);
+ Engine.MakeCompletionList(result, true);
}
else // Completion outside method body.
this.Engine.ComplateInParsedTypeAst(method.Ast, fileIndex, line, col, source)
More information about the svn
mailing list