diff options
author | EricFromCanada <eric3knibbe@gmail.com> | 2012-09-09 14:00:02 -0400 |
---|---|---|
committer | EricFromCanada <eric3knibbe@gmail.com> | 2012-09-09 14:00:02 -0400 |
commit | 9bb5cd1394a797d74b70077bfed1b096f650507c (patch) | |
tree | 08d26edb0961707bd59c4ad7552ee6ac7af41467 /pygments/lexers/compiled.py | |
parent | 717826723ca9f44b93702d68040c7be2923d8bc6 (diff) | |
parent | e2b385ab0a41e3ca21e1575f291c0ff2eb39f65e (diff) | |
download | pygments-9bb5cd1394a797d74b70077bfed1b096f650507c.tar.gz |
merged
Diffstat (limited to 'pygments/lexers/compiled.py')
-rw-r--r-- | pygments/lexers/compiled.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py index 2eca91ba..c5c89ccc 100644 --- a/pygments/lexers/compiled.py +++ b/pygments/lexers/compiled.py @@ -2959,33 +2959,33 @@ class RustLexer(RegexLexer): (r'#\(', Comment.Preproc, 'attribute('), # Macros (r'#[A-Za-z_][A-Za-z0-9_]*\[', Comment.Preproc, 'attribute['), - (r'#[A-Za-z_][A-Za-z0-9_]*\(', Comment.Preproc, 'attribute(') + (r'#[A-Za-z_][A-Za-z0-9_]*\(', Comment.Preproc, 'attribute('), ], - 'number_lit': { - (r'(([ui](8|16|32|64)?)|(f(32|64)?))?', Keyword, '#pop') - }, - 'string': { + 'number_lit': [ + (r'(([ui](8|16|32|64)?)|(f(32|64)?))?', Keyword, '#pop'), + ], + 'string': [ (r'"', String, '#pop'), (r"""\\['"\\nrt]|\\x[0-9a-fA-F]{2}|\\[0-7]{1,3}""" r"""|\\u[0-9a-fA-F]{4}|\\U[0-9a-fA-F]{8}""", String.Escape), (r'[^\\"]+', String), - (r'\\', String) - }, - 'attribute_common': { + (r'\\', String), + ], + 'attribute_common': [ (r'"', String, 'string'), (r'\[', Comment.Preproc, 'attribute['), (r'\(', Comment.Preproc, 'attribute('), - }, - 'attribute[': { + ], + 'attribute[': [ include('attribute_common'), (r'\];?', Comment.Preproc, '#pop'), - (r'[^"\]]+', Comment.Preproc) - }, - 'attribute(': { + (r'[^"\]]+', Comment.Preproc), + ], + 'attribute(': [ include('attribute_common'), (r'\);?', Comment.Preproc, '#pop'), - (r'[^"\)]+', Comment.Preproc) - } + (r'[^"\)]+', Comment.Preproc), + ], } |