ThirdParty/Pygments/pygments/lexers/chapel.py

changeset 5713
6762afd9f963
parent 5072
aab59042fefb
child 6651
e8f3b5568b21
--- a/ThirdParty/Pygments/pygments/lexers/chapel.py	Sun Apr 23 16:40:31 2017 +0200
+++ b/ThirdParty/Pygments/pygments/lexers/chapel.py	Tue Apr 25 18:36:38 2017 +0200
@@ -5,7 +5,7 @@
 
     Lexer for the Chapel language.
 
-    :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.
 """
 
@@ -42,17 +42,17 @@
             (r'(bool|complex|imag|int|opaque|range|real|string|uint)\b',
              Keyword.Type),
             (words((
-                'align', 'atomic', 'begin', 'break', 'by', 'cobegin', 'coforall',
-                'continue', 'delete', 'dmapped', 'do', 'domain', 'else', 'enum',
-                'except', 'export', 'extern', 'for', 'forall', 'if', 'index',
-                'inline', 'iter', 'label', 'lambda', 'let', 'local', 'new',
-                'noinit', 'on', 'only', 'otherwise', 'pragma', 'private',
-                'public', 'reduce', 'require', 'return', 'scan', 'select',
-                'serial', 'single', 'sparse', 'subdomain', 'sync', 'then',
-                'use', 'when', 'where', 'while', 'with', 'yield', 'zip'),
-                   suffix=r'\b'),
+                'align', 'as', 'atomic', 'begin', 'break', 'by', 'cobegin',
+                'coforall', 'continue', 'delete', 'dmapped', 'do', 'domain',
+                'else', 'enum', 'except', 'export', 'extern', 'for', 'forall',
+                'if', 'index', 'inline', 'iter', 'label', 'lambda', 'let',
+                'local', 'new', 'noinit', 'on', 'only', 'otherwise', 'pragma',
+                'private', 'public', 'reduce', 'require', 'return', 'scan',
+                'select', 'serial', 'single', 'sparse', 'subdomain', 'sync',
+                'then', 'use', 'when', 'where', 'while', 'with', 'yield',
+                'zip'), suffix=r'\b'),
              Keyword),
-            (r'(proc)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'procname'),
+            (r'(proc)((?:\s)+)', bygroups(Keyword, Text), 'procname'),
             (r'(class|module|record|union)(\s+)', bygroups(Keyword, Text),
              'classname'),
 
@@ -96,6 +96,7 @@
             (r'[a-zA-Z_][\w$]*', Name.Class, '#pop'),
         ],
         'procname': [
-            (r'[a-zA-Z_][\w$]*', Name.Function, '#pop'),
+            (r'([a-zA-Z_][\w$]+|\~[a-zA-Z_][\w$]+|[+*/!~%<>=&^|\-]{1,2})',
+             Name.Function, '#pop'),
         ],
     }

eric ide

mercurial