Commits

Eric Knibbe committed e2ca2c3

rule simplifications

Comments (0)

Files changed (1)

pygments/lexers/web.py

             include('lasso'),
         ],
         'lassofile': [
-            (r'\]', Comment.Preproc, '#pop'),
-            (r'\?>', Comment.Preproc, '#pop'),
+            (r'\]|\?>', Comment.Preproc, '#pop'),
             include('lasso'),
         ],
         'whitespacecomments': [
                 bygroups(Name.Builtin.Pseudo, Name.Variable.Class)),
             (r"(self)(\s*->\s*)('[a-z_][\w.]*')",
                 bygroups(Name.Builtin.Pseudo, Operator, Name.Variable.Class)),
-            (r'(\.\.?)([a-z_][\w.]*(=(?=\s*\())?)',
+            (r'(\.\.?)([a-z_][\w.]*(=(?!=))?)',
                 bygroups(Name.Builtin.Pseudo, Name.Other.Member)),
-            (r'(->\\?\s*|&\s*)([a-z_][\w.]*(=(?=\s*\())?)',
+            (r'(->\\?\s*|&\s*)([a-z_][\w.]*(=(?!=))?)',
                 bygroups(Operator, Name.Other.Member)),
             (r'(self|inherited)\b', Name.Builtin.Pseudo),
             (r'-[a-z_][\w.]*', Name.Attribute),
             (r"'", String.Single, '#pop'),
             (r"[^'\\]+", String.Single),
             include('escape'),
-            (r"\\+", String.Single),
+            (r"\\", String.Single),
         ],
         'doublestring': [
             (r'"', String.Double, '#pop'),
             (r'[^"\\]+', String.Double),
             include('escape'),
-            (r'\\+', String.Double),
+            (r'\\', String.Double),
         ],
         'escape': [
             (r'\\(U[\da-f]{8}|u[\da-f]{4}|x[\da-f]{1,2}|[0-7]{1,3}|:[^:]+:|'