summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-08-21 18:54:36 +0200
committerGeorg Brandl <georg@python.org>2012-08-21 18:54:36 +0200
commitb8137029f68e0e807d3448edf1400daf4481f119 (patch)
tree49f26fc7bcd8e16e8eea9402d302221205294657
parent58abfa7c55988d3344248bfb93f862bfcb4f19ca (diff)
downloadpygments-b8137029f68e0e807d3448edf1400daf4481f119.tar.gz
Closes #803: remove set literals from lexer definition
-rw-r--r--pygments/lexers/compiled.py30
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),
+ ],
}