summaryrefslogtreecommitdiff
path: root/pygments/lexers/compiled.py
diff options
context:
space:
mode:
authorCorey Richardson <corey@octayn.net>2014-01-19 16:51:28 -0500
committerCorey Richardson <corey@octayn.net>2014-01-19 16:51:28 -0500
commit1b056850b148766c84212390ae469f5db38fe92c (patch)
treeb7f544e17797f88f59da0b964df032b38d967d90 /pygments/lexers/compiled.py
parent9f75bd0977c476badfbd394c25f3a98f2d0f1edc (diff)
downloadpygments-1b056850b148766c84212390ae469f5db38fe92c.tar.gz
Address comments
Diffstat (limited to 'pygments/lexers/compiled.py')
-rw-r--r--pygments/lexers/compiled.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py
index 4afa4ccf..0da839e9 100644
--- a/pygments/lexers/compiled.py
+++ b/pygments/lexers/compiled.py
@@ -3197,7 +3197,7 @@ class RustLexer(RegexLexer):
# Whitespace and Comments
(r'\n', Text),
(r'\s+', Text),
- (r'///(.*?)\n'),
+ (r'//[/!](.*?)\n', Comment.Doc),
(r'//(.*?)\n', Comment.Single),
(r'/[*](.|\n)*?[*]/', Comment.Multiline),
@@ -3206,16 +3206,17 @@ class RustLexer(RegexLexer):
r'|do|else|enum|extern'
r'|fn|for|if|impl|in'
r'|loop|match|mut|priv|proc|pub'
- r'|ref|return|static|\'static|struct|trait|true|type|unsafe|while',
+ r'|ref|return|static|\'static|struct|trait|true|type'
+ r'|unsafe|while)\b',
Keyword),
(r'(alignof|be|const|offsetof|pure|sizeof|typeof|once|unsized'
- r'|yield)', Keyword.Reserved),
- (r'(mod|use)', Keyword.Namespace),
- (r'(true|false)', Keyword.Constant),
+ r'|yield)\b', Keyword.Reserved),
+ (r'(mod|use)\b', Keyword.Namespace),
+ (r'(true|false)\b', Keyword.Constant),
(r'let', Keyword.Declaration),
(r'(u8|u16|u32|u64|i8|i16|i32|i64|uint|int|f32|f64'
- r'|str|bool)', Keyword.Type),
- (r'self', Name.Builtin.Pseudo),
+ r'|str|bool)\b', Keyword.Type),
+ (r'self\b', Name.Builtin.Pseudo),
# Prelude
(r'(Freeze|Pod|Send|Sized|Add|Sub|Mul|Div|Rem|Neg|Not|BitAnd'
r'|BitOr|BitXor|Drop|Shl|Shr|Index|Option|Some|None|Result'