diff options
author | Richard van Velzen <richard@goreply.com> | 2023-03-01 00:08:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 00:08:01 +0100 |
commit | 5b96a7f12bff42234054fd3a3f6751c1ac3aed18 (patch) | |
tree | 9df0cdc5a41d7f4f49ea73f260120c58dd169ed2 /pygments | |
parent | 80357823f6252a8b99c05bbd5338cf3be80bd052 (diff) | |
download | pygments-git-5b96a7f12bff42234054fd3a3f6751c1ac3aed18.tar.gz |
Fix lexing PHP anonymous classes with no parameters (#2359)
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/lexers/php.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pygments/lexers/php.py b/pygments/lexers/php.py index f48fa382..702bdd8d 100644 --- a/pygments/lexers/php.py +++ b/pygments/lexers/php.py @@ -205,6 +205,7 @@ class PhpLexer(RegexLexer): (r'[~!%^&*+=|:.<>/@-]+', Operator), (r'\?', Operator), # don't add to the charclass above! (r'[\[\]{}();,]+', Punctuation), + (r'(new)(\s+)(class)\b', bygroups(Keyword, Text, Keyword)), (r'(class)(\s+)', bygroups(Keyword, Text), 'classname'), (r'(function)(\s*)(?=\()', bygroups(Keyword, Text)), (r'(function)(\s+)(&?)(\s*)', |