summaryrefslogtreecommitdiff
path: root/pygments/lexers/compiled.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-09-16 09:51:52 +0200
committerGeorg Brandl <georg@python.org>2014-09-16 09:51:52 +0200
commit508e306f64288290c46602f904f8d25d867c0b50 (patch)
tree78579062c1169528dba5049efc7e1793653228e2 /pygments/lexers/compiled.py
parent318728914ec120c42bd892905f98414d01589d3b (diff)
parent36b2888b4a17b28e6bcd7bc76ee57ed706de0f01 (diff)
downloadpygments-508e306f64288290c46602f904f8d25d867c0b50.tar.gz
merge with R4PaSs/pygments-main
Diffstat (limited to 'pygments/lexers/compiled.py')
-rw-r--r--pygments/lexers/compiled.py24
1 files changed, 16 insertions, 8 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py
index 480e4a8f..1cf5fee7 100644
--- a/pygments/lexers/compiled.py
+++ b/pygments/lexers/compiled.py
@@ -2437,7 +2437,7 @@ class AdaLexer(RegexLexer):
"""
name = 'Ada'
- aliases = ['ada', 'ada95' 'ada2005']
+ aliases = ['ada', 'ada95', 'ada2005']
filenames = ['*.adb', '*.ads', '*.ada']
mimetypes = ['text/x-ada']
@@ -3321,7 +3321,7 @@ class RustLexer(RegexLexer):
(r'\s+', Text),
(r'//[/!](.*?)\n', Comment.Doc),
(r'//(.*?)\n', Comment.Single),
- (r'/[*](.|\n)*?[*]/', Comment.Multiline),
+ (r'/\*', Comment.Multiline, 'comment'),
# Keywords
(r'(as|box|break|continue'
@@ -3403,6 +3403,12 @@ class RustLexer(RegexLexer):
(r'([A-Za-z_]\w*)!\s*([A-Za-z_]\w*)?\(',
bygroups(Comment.Preproc, Name), 'macro('),
],
+ 'comment': [
+ (r'[^*/]+', Comment.Multiline),
+ (r'/\*', Comment.Multiline, '#push'),
+ (r'\*/', Comment.Multiline, '#pop'),
+ (r'[*/]', Comment.Multiline),
+ ],
'number_lit': [
(r'(([ui](8|16|32|64)?)|(f(32|64)?))?', Keyword, '#pop'),
],
@@ -3920,11 +3926,11 @@ class ChapelLexer(RegexLexer):
(r'(false|nil|true)\b', Keyword.Constant),
(r'(bool|complex|imag|int|opaque|range|real|string|uint)\b',
Keyword.Type),
- (r'(atomic|begin|break|by|cobegin|coforall|continue|iter|'
+ (r'(align|atomic|begin|break|by|cobegin|coforall|continue|'
r'delete|dmapped|do|domain|else|enum|export|extern|for|forall|'
- r'if|index|inline|label|lambda|let|local|new|on|otherwise|'
- r'reduce|return|scan|select|serial|single|sparse|'
- r'subdomain|sync|then|use|when|where|while|yield|zip)\b',
+ r'if|index|inline|iter|label|lambda|let|local|new|noinit|on|'
+ r'otherwise|pragma|reduce|return|scan|select|serial|single|sparse|'
+ r'subdomain|sync|then|use|when|where|while|with|yield|zip)\b',
Keyword),
(r'(proc)((?:\s|\\\s)+)', bygroups(Keyword, Text), 'procname'),
(r'(class|module|record|union)(\s+)', bygroups(Keyword, Text),
@@ -3946,15 +3952,17 @@ class ChapelLexer(RegexLexer):
(r'0[bB][0-1]+', Number.Bin),
# -- hex
(r'0[xX][0-9a-fA-F]+', Number.Hex),
+ # -- octal
+ (r'0[oO][0-7]+', Number.Oct),
# -- decimal
- (r'(0|[1-9][0-9]*)', Number.Integer),
+ (r'[0-9]+', Number.Integer),
# strings
(r'["\'](\\\\|\\"|[^"\'])*["\']', String),
# tokens
(r'(=|\+=|-=|\*=|/=|\*\*=|%=|&=|\|=|\^=|&&=|\|\|=|<<=|>>=|'
- r'<=>|\.\.|by|#|\.\.\.|'
+ r'<=>|<~>|\.\.|by|#|\.\.\.|'
r'&&|\|\||!|&|\||\^|~|<<|>>|'
r'==|!=|<=|>=|<|>|'
r'[+\-*/%]|\*\*)', Operator),