Georg Brandl avatar Georg Brandl committed f7179b5

Closes #803: remove set literals from lexer definition

Comments (0)

Files changed (1)

pygments/lexers/compiled.py

             (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),
+        ],
     }
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.