ThirdParty/Pygments/pygments/lexers/dotnet.py

changeset 5713
6762afd9f963
parent 5072
aab59042fefb
child 6651
e8f3b5568b21
--- a/ThirdParty/Pygments/pygments/lexers/dotnet.py	Sun Apr 23 16:40:31 2017 +0200
+++ b/ThirdParty/Pygments/pygments/lexers/dotnet.py	Tue Apr 25 18:36:38 2017 +0200
@@ -5,13 +5,13 @@
 
     Lexers for .net languages.
 
-    :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 import re
 
 from pygments.lexer import RegexLexer, DelegatingLexer, bygroups, include, \
-    using, this, default
+    using, this, default, words
 from pygments.token import Punctuation, \
     Text, Comment, Operator, Keyword, Name, String, Number, Literal, Other
 from pygments.util import get_choice_opt, iteritems
@@ -375,8 +375,8 @@
     filenames = ['*.vb', '*.bas']
     mimetypes = ['text/x-vbnet', 'text/x-vba']  # (?)
 
-    uni_name = '[_' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl') + ']' + \
-               '[' + uni.combine('Lu', 'Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc',
+    uni_name = '[_' + uni.combine('Ll', 'Lt', 'Lm', 'Nl') + ']' + \
+               '[' + uni.combine('Ll', 'Lt', 'Lm', 'Nl', 'Nd', 'Pc',
                                  'Cf', 'Mn', 'Mc') + ']*'
 
     flags = re.MULTILINE | re.IGNORECASE
@@ -394,25 +394,26 @@
             (r'[(){}!#,.:]', Punctuation),
             (r'Option\s+(Strict|Explicit|Compare)\s+'
              r'(On|Off|Binary|Text)', Keyword.Declaration),
-            (r'(?<!\.)(AddHandler|Alias|'
-             r'ByRef|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|'
-             r'CDec|CDbl|CInt|CLng|CObj|Continue|CSByte|CShort|'
-             r'CSng|CStr|CType|CUInt|CULng|CUShort|Declare|'
-             r'Default|Delegate|DirectCast|Do|Each|Else|ElseIf|'
-             r'EndIf|Erase|Error|Event|Exit|False|Finally|For|'
-             r'Friend|Get|Global|GoSub|GoTo|Handles|If|'
-             r'Implements|Inherits|Interface|'
-             r'Let|Lib|Loop|Me|MustInherit|'
-             r'MustOverride|MyBase|MyClass|Narrowing|New|Next|'
-             r'Not|Nothing|NotInheritable|NotOverridable|Of|On|'
-             r'Operator|Option|Optional|Overloads|Overridable|'
-             r'Overrides|ParamArray|Partial|Private|Protected|'
-             r'Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|'
-             r'Return|Select|Set|Shadows|Shared|Single|'
-             r'Static|Step|Stop|SyncLock|Then|'
-             r'Throw|To|True|Try|TryCast|Wend|'
-             r'Using|When|While|Widening|With|WithEvents|'
-             r'WriteOnly)\b', Keyword),
+            (words((
+                'AddHandler', 'Alias', 'ByRef', 'ByVal', 'Call', 'Case',
+                'Catch', 'CBool', 'CByte', 'CChar', 'CDate', 'CDec', 'CDbl',
+                'CInt', 'CLng', 'CObj', 'Continue', 'CSByte', 'CShort', 'CSng',
+                'CStr', 'CType', 'CUInt', 'CULng', 'CUShort', 'Declare',
+                'Default', 'Delegate', 'DirectCast', 'Do', 'Each', 'Else',
+                'ElseIf', 'EndIf', 'Erase', 'Error', 'Event', 'Exit', 'False',
+                'Finally', 'For', 'Friend', 'Get', 'Global', 'GoSub', 'GoTo',
+                'Handles', 'If', 'Implements', 'Inherits', 'Interface', 'Let',
+                'Lib', 'Loop', 'Me', 'MustInherit', 'MustOverride', 'MyBase',
+                'MyClass', 'Narrowing', 'New', 'Next', 'Not', 'Nothing',
+                'NotInheritable', 'NotOverridable', 'Of', 'On', 'Operator',
+                'Option', 'Optional', 'Overloads', 'Overridable', 'Overrides',
+                'ParamArray', 'Partial', 'Private', 'Protected', 'Public',
+                'RaiseEvent', 'ReadOnly', 'ReDim', 'RemoveHandler', 'Resume',
+                'Return', 'Select', 'Set', 'Shadows', 'Shared', 'Single',
+                'Static', 'Step', 'Stop', 'SyncLock', 'Then', 'Throw', 'To',
+                'True', 'Try', 'TryCast', 'Wend', 'Using', 'When', 'While',
+                'Widening', 'With', 'WithEvents', 'WriteOnly'),
+                   prefix='(?<!\.)', suffix=r'\b'), Keyword),
             (r'(?<!\.)End\b', Keyword, 'end'),
             (r'(?<!\.)(Dim|Const)\b', Keyword, 'dim'),
             (r'(?<!\.)(Function|Sub|Property)(\s+)',

eric ide

mercurial