diff options
author | Georg Brandl <georg@python.org> | 2014-09-16 09:41:16 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-09-16 09:41:16 +0200 |
commit | f9138235acc1615b0cc9b940301c99c74bc1dd49 (patch) | |
tree | 92bfcef7ef068f3c4c70e5ef0826058f5b0144df /pygments/lexers/compiled.py | |
parent | a64f6bd6bf6090a71d048ba426e21a19a906704d (diff) | |
parent | f3aaf003440cbde495e12c3ae5e53bc48b9b1ffd (diff) | |
download | pygments-f9138235acc1615b0cc9b940301c99c74bc1dd49.tar.gz |
Merged in mattmontag/pygments-main/mattmontag/sentence-fix-1408847742266 (pull request #395)
Sentence fix
Diffstat (limited to 'pygments/lexers/compiled.py')
-rw-r--r-- | pygments/lexers/compiled.py | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py index 38bd901f..67f2b5ee 100644 --- a/pygments/lexers/compiled.py +++ b/pygments/lexers/compiled.py @@ -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), |