ThirdParty/Pygments/pygments/lexers/webmisc.py

changeset 5713
6762afd9f963
parent 4697
c2e9bf425554
child 6651
e8f3b5568b21
--- a/ThirdParty/Pygments/pygments/lexers/webmisc.py	Sun Apr 23 16:40:31 2017 +0200
+++ b/ThirdParty/Pygments/pygments/lexers/webmisc.py	Tue Apr 25 18:36:38 2017 +0200
@@ -5,7 +5,7 @@
 
     Lexers for misc. web stuff.
 
-    :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -358,8 +358,10 @@
              bygroups(Keyword, Text, Keyword), 'itemtype'),
             (r'(treat)(\s+)(as)\b',
              bygroups(Keyword, Text, Keyword), 'itemtype'),
-            (r'(case)(\s+)(' + stringdouble + ')', bygroups(Keyword, Text, String.Double), 'itemtype'),
-            (r'(case)(\s+)(' + stringsingle + ')', bygroups(Keyword, Text, String.Single), 'itemtype'),
+            (r'(case)(\s+)(' + stringdouble + ')',
+             bygroups(Keyword, Text, String.Double), 'itemtype'),
+            (r'(case)(\s+)(' + stringsingle + ')',
+             bygroups(Keyword, Text, String.Single), 'itemtype'),
             (r'(case|as)\b', Keyword, 'itemtype'),
             (r'(\))(\s*)(as)',
              bygroups(Punctuation, Text, Keyword), 'itemtype'),
@@ -367,7 +369,8 @@
             (r'(for|let|previous|next)(\s+)(\$)',
              bygroups(Keyword, Text, Name.Variable), 'varname'),
             (r'(for)(\s+)(tumbling|sliding)(\s+)(window)(\s+)(\$)',
-             bygroups(Keyword, Text, Keyword, Text, Keyword, Text, Name.Variable), 'varname'),
+             bygroups(Keyword, Text, Keyword, Text, Keyword, Text, Name.Variable),
+             'varname'),
             # (r'\)|\?|\]', Punctuation, '#push'),
             (r'\)|\?|\]', Punctuation),
             (r'(empty)(\s+)(greatest|least)', bygroups(Keyword, Text, Keyword)),
@@ -417,17 +420,21 @@
             (r'preserve|no-preserve', Keyword),
             (r',', Punctuation),
         ],
-        'annotationname':[
+        'annotationname': [
             (r'\(:', Comment, 'comment'),
             (qname, Name.Decorator),
             (r'(\()(' + stringdouble + ')', bygroups(Punctuation, String.Double)),
             (r'(\()(' + stringsingle + ')', bygroups(Punctuation, String.Single)),
-            (r'(\,)(\s+)(' + stringdouble + ')', bygroups(Punctuation, Text, String.Double)),
-            (r'(\,)(\s+)(' + stringsingle + ')', bygroups(Punctuation, Text, String.Single)),
+            (r'(\,)(\s+)(' + stringdouble + ')',
+             bygroups(Punctuation, Text, String.Double)),
+            (r'(\,)(\s+)(' + stringsingle + ')',
+             bygroups(Punctuation, Text, String.Single)),
             (r'\)', Punctuation),
             (r'(\s+)(\%)', bygroups(Text, Name.Decorator), 'annotationname'),
-            (r'(\s+)(variable)(\s+)(\$)', bygroups(Text, Keyword.Declaration, Text, Name.Variable), 'varname'),
-            (r'(\s+)(function)(\s+)', bygroups(Text, Keyword.Declaration, Text), 'root')
+            (r'(\s+)(variable)(\s+)(\$)',
+             bygroups(Text, Keyword.Declaration, Text, Name.Variable), 'varname'),
+            (r'(\s+)(function)(\s+)',
+             bygroups(Text, Keyword.Declaration, Text), 'root')
         ],
         'varname': [
             (r'\(:', Comment, 'comment'),
@@ -473,8 +480,10 @@
              bygroups(Keyword, Text, Keyword), 'singletype'),
             (r'(treat)(\s+)(as)', bygroups(Keyword, Text, Keyword)),
             (r'(instance)(\s+)(of)', bygroups(Keyword, Text, Keyword)),
-            (r'(case)(\s+)(' + stringdouble + ')', bygroups(Keyword, Text, String.Double), 'itemtype'),
-            (r'(case)(\s+)(' + stringsingle + ')', bygroups(Keyword, Text, String.Single), 'itemtype'),
+            (r'(case)(\s+)(' + stringdouble + ')',
+             bygroups(Keyword, Text, String.Double), 'itemtype'),
+            (r'(case)(\s+)(' + stringsingle + ')',
+             bygroups(Keyword, Text, String.Single), 'itemtype'),
             (r'case|as', Keyword, 'itemtype'),
             (r'(\))(\s*)(as)', bygroups(Operator, Text, Keyword), 'itemtype'),
             (ncname + r':\*', Keyword.Type, 'operator'),

eric ide

mercurial