summaryrefslogtreecommitdiff
path: root/pygments/lexers/chapel.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/chapel.py')
-rw-r--r--pygments/lexers/chapel.py28
1 files changed, 19 insertions, 9 deletions
diff --git a/pygments/lexers/chapel.py b/pygments/lexers/chapel.py
index 55bf0e1e..16ce720b 100644
--- a/pygments/lexers/chapel.py
+++ b/pygments/lexers/chapel.py
@@ -42,16 +42,26 @@ class ChapelLexer(RegexLexer):
(r'(bool|complex|imag|int|opaque|range|real|string|uint)\b',
Keyword.Type),
(words((
- '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',
+ 'align', 'as', 'atomic',
+ 'begin', 'borrowed', 'break', 'by',
+ 'catch', 'cobegin', 'coforall', 'continue',
+ 'delete', 'dmapped', 'do', 'domain',
+ 'else', 'enum', 'except', 'export', 'extern',
+ 'for', 'forall',
+ 'if', 'index', 'inline',
+ 'label', 'lambda', 'let', 'local',
+ 'new', 'noinit',
+ 'on', 'only', 'otherwise', 'override', 'owned',
+ 'pragma', 'private', 'prototype', 'public',
+ 'reduce', 'require', 'return',
+ 'scan', 'select', 'serial', 'shared', 'single', 'sparse', 'subdomain', 'sync',
+ 'then', 'throw', 'throws', 'try',
+ 'unmanaged', 'use',
+ 'when', 'where', 'while', 'with',
+ 'yield',
'zip'), suffix=r'\b'),
Keyword),
+ (r'(iter)((?:\s)+)', bygroups(Keyword, Text), 'procname'),
(r'(proc)((?:\s)+)', bygroups(Keyword, Text), 'procname'),
(r'(class|module|record|union)(\s+)', bygroups(Keyword, Text),
'classname'),
@@ -96,7 +106,7 @@ class ChapelLexer(RegexLexer):
(r'[a-zA-Z_][\w$]*', Name.Class, '#pop'),
],
'procname': [
- (r'([a-zA-Z_][\w$]+|\~[a-zA-Z_][\w$]+|[+*/!~%<>=&^|\-]{1,2})',
+ (r'([a-zA-Z_][.\w$]*|\~[a-zA-Z_][.\w$]*|[+*/!~%<>=&^|\-]{1,2})',
Name.Function, '#pop'),
],
}