Commits

Andy Li  committed 2241189

No, the ident of compiler switch should not contain "-".

  • Participants
  • Parent commits e4fad03
  • Branches Haxe3

Comments (0)

Files changed (1)

File pygments/lexers/web.py

             (r'\!', Comment.Preproc),
             (r'\(', Comment.Preproc, ('#pop', 'preproc-parenthesis')),
             
-            # Haxe preproc name can contains '-'
-            (ident + r'(?:-' + ident + ')*', Comment.Preproc, '#pop'),
+            (ident, Comment.Preproc, '#pop'),
             (r"'", String.Single, ('#pop', 'string-single')),
             (r'"', String.Double, ('#pop', 'string-double')),
         ],
             (r'\!', Comment.Preproc),
             (r'\(', Comment.Preproc, ('#pop', 'preproc-expr-chain', 'preproc-parenthesis')),
             
-            # Haxe preproc name can contains '-'
-            (ident + r'(?:-' + ident + ')*', Comment.Preproc, ('#pop', 'preproc-expr-chain')),
+            (ident, Comment.Preproc, ('#pop', 'preproc-expr-chain')),
             (r"'", String.Single, ('#pop', 'preproc-expr-chain', 'string-single')),
             (r'"', String.Double, ('#pop', 'preproc-expr-chain', 'string-double')),
         ],