diff options
author | Georg Brandl <georg@python.org> | 2021-01-29 12:53:43 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2021-01-29 12:53:43 +0100 |
commit | c83cd55dc975fdb02271e6d640b2ff79461151ff (patch) | |
tree | 7346c9739450fbe25b211f8b666259998591490d /tests/snippets | |
parent | ce06c52278bb7723fd1bac8ae0b24dea656588e1 (diff) | |
download | pygments-git-c83cd55dc975fdb02271e6d640b2ff79461151ff.tar.gz |
Fix mishandling '*/' in C/C++ and related (fixes #1695)
Diffstat (limited to 'tests/snippets')
-rw-r--r-- | tests/snippets/c/test_comment_end.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/snippets/c/test_comment_end.txt b/tests/snippets/c/test_comment_end.txt new file mode 100644 index 00000000..da46accd --- /dev/null +++ b/tests/snippets/c/test_comment_end.txt @@ -0,0 +1,31 @@ +In the past the "*/" was marked as an error to "helpfully" +indicate a wrong comment end. + +---input--- +int m21=((result_0*0+result_1*/*0<-----*/1)%mod+mod)%mod; + +---tokens--- +'int' Keyword.Type +' ' Text +'m21' Name +'=' Operator +'(' Punctuation +'(' Punctuation +'result_0' Name +'*' Operator +'0' Literal.Number.Integer +'+' Operator +'result_1' Name +'*' Operator +'/*0<-----*/' Comment.Multiline +'1' Literal.Number.Integer +')' Punctuation +'%' Operator +'mod' Name +'+' Operator +'mod' Name +')' Punctuation +'%' Operator +'mod' Name +';' Punctuation +'\n' Text |