diff options
author | Jeffrey B. Arnold <jeffrey.arnold@gmail.com> | 2012-09-08 08:39:25 -0400 |
---|---|---|
committer | Jeffrey B. Arnold <jeffrey.arnold@gmail.com> | 2012-09-08 08:39:25 -0400 |
commit | fbed153cb98976256d5707d902a9c91599c7b152 (patch) | |
tree | 5dc3bdf3d5a5055ed33fe9bff1193d4bf6246417 /pygments/lexers/compiled.py | |
parent | 4424226580bb8b3b47943306df75a1a654cd0529 (diff) | |
parent | 0c363d7084ebd5b246c6d11e3494a3e481e91b2c (diff) | |
download | pygments-fbed153cb98976256d5707d902a9c91599c7b152.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), + ], } |