Commits

Georg Brandl committed 0253590 Merge

Merged in ziaw/pygments-main (pull request #41)

Comments (0)

Files changed (2)

pygments/lexers/dotnet.py

 
                 (r'[~!%^&*()+=|\[\]:;,.<>/?-]', Punctuation),
                 (r'[{}]', Punctuation),
-                (r'@"(\\\\|\\"|[^"])*"', String),
+                (r'@"(""|[^"])*"', String),
                 (r'"(\\\\|\\"|[^"\n])*["\n]', String),
                 (r"'\\.'|'[^\\]'", String.Char),
 		(r"0[xX][0-9a-fA-F]+[Ll]?", Number),
             ],
             'splice-string-content': [
                 (r'if|match', Keyword),
-                (r'[~!%^&*+=|\[\]:;,.<>/?-]', Punctuation),
+                (r'[~!%^&*+=|\[\]:;,.<>/?-\\"$ ]', Punctuation),
                 (cs_ident, Name), 
+                (r'\d+', Number), 
                 (r'\(', Punctuation, '#push'),
                 (r'\)', Punctuation, '#pop')
             ]

tests/examplefiles/nemerle_sample.n

     public virtual someMethod(str : string) : list[double]
     {
       def x = "simple string";
-      def x = $"simple $splice string $(spliceMethod())";
+      def x = $"simple $splice string $(spliceMethod() + 1)";
       def x = <#
         recursive <# string #> sample
       #>;
       def x = $<#
         recursive $splice <# string #> sample
+        ..$(lst; "; "; x => $"x * 2 = $(x * 2)") str
       #>;
+      def x = @"somestring \";
 
       def localFunc(arg)
       {
   macro sampleMacro(expr)
   syntax ("write", expr)
   {
-    <[ WriteLine($expr) ]>
+    <[ WriteLine($(expr : dyn)) ]>
   }
 }