[svn] r6943: vs-plugin/trunk: Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ScanLexer.n Nemerle.VsI...

IT svnadmin at nemerle.org
Sat Nov 18 21:39:38 CET 2006


Log:
Special colorizing for '$' and '..' in quotation. 

Author: IT
Date: Sat Nov 18 21:39:34 2006
New Revision: 6943

Modified:
   vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ScanLexer.n
   vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleLanguageService.cs

Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ScanLexer.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ScanLexer.n	(original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/ScanLexer.n	Sat Nov 18 21:39:34 2006
@@ -427,8 +427,13 @@
             pos = col - 1;
           }
 
-          if (nm == ".") (TP.Delimiter, C.Operator, TR.MemberSelect)
-          else           (TP.Operator,  C.Operator, TR.None)
+          match (nm)
+          {
+          | ".." when _tokenInfo.IsQuotation
+          | "$"  when _tokenInfo.IsQuotation => (TP.Operator,  C.Keyword,  TR.None)
+          | "."                              => (TP.Delimiter, C.Operator, TR.MemberSelect)
+          | _                                => (TP.Operator,  C.Operator, TR.None)
+          }
 
         //| StringLiteral             => (TP.String,     C.String,     TR.None)
         | CharLiteral               => (TP.Literal,    C.String,     TR.None)

Modified: vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleLanguageService.cs
==============================================================================
--- vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleLanguageService.cs	(original)
+++ vs-plugin/trunk/Nemerle.VsIntegration/LanguageService/NemerleLanguageService.cs	Sat Nov 18 21:39:34 2006
@@ -446,9 +446,13 @@
 		private AuthoringScope GetDefaultScope(ParseRequest request)
 		{
 			ProjectInfo projectInfo = ProjectInfo.FindProject(request.FileName);
+
+			if (projectInfo != null)
 			return new NemerleAuthoringScope(
 				projectInfo, request.Sink, request.FileName,
 				new SourceTextManager(projectInfo.GetSource(request.FileName)));
+
+			return null;
 		}
 
 		private ProjectInfo GetProjectInfo(ParseRequest request)



More information about the svn mailing list