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 /tests | |
parent | 80357823f6252a8b99c05bbd5338cf3be80bd052 (diff) | |
download | pygments-git-5b96a7f12bff42234054fd3a3f6751c1ac3aed18.tar.gz |
Fix lexing PHP anonymous classes with no parameters (#2359)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/snippets/php/anonymous_class.txt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/snippets/php/anonymous_class.txt b/tests/snippets/php/anonymous_class.txt new file mode 100644 index 00000000..4f5e2aef --- /dev/null +++ b/tests/snippets/php/anonymous_class.txt @@ -0,0 +1,28 @@ +---input--- +<?php +$containerObject = new class { + public $something; +} + +---tokens--- +'<?php' Comment.Preproc +'\n' Text + +'$containerObject' Name.Variable +' ' Text +'=' Operator +' ' Text +'new' Keyword +' ' Text +'class' Keyword +' ' Text +'{' Punctuation +'\n ' Text +'public' Keyword +' ' Text +'$something' Name.Variable +';' Punctuation +'\n' Text + +'}' Punctuation +'\n' Text |