This repository has been archived on 2024-06-20. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
coffee.pygments/tests/snippets/pycon/broken_tb.txt
Jean Abou-Samra c97762448b
Refactor PythonConsoleLexer as a DelegatingLexer (#2412)
This is simpler and more reliable than hand-coding the state machine.

Fixes #2411
2023-04-17 18:41:55 +02:00

98 lines
2.2 KiB
Text

---input---
>>> exec('"')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 1
"
^
SyntaxError: EOL while scanning string literal
>>> exec('"')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 1, in <module>
"
^
SyntaxError: EOL while scanning string literal
---tokens---
'>>> ' Generic.Prompt
'exec' Name
'(' Punctuation
"'" Literal.String.Single
'"' Literal.String.Single
"'" Literal.String.Single
')' Punctuation
'\n' Text.Whitespace
'Traceback (most recent call last):\n' Generic.Traceback
' File ' Text
'"<stdin>"' Name.Builtin
', line ' Text
'1' Literal.Number
', in ' Text
'<module>' Name
'\n' Text.Whitespace
' File ' Text
'"<string>"' Name.Builtin
', line ' Text
'1' Literal.Number
'\n' Text.Whitespace
' ' Text.Whitespace
'"' Literal.String.Double
'\n' Text.Whitespace
' ' Text.Whitespace
'^' Punctuation.Marker
'\n' Text.Whitespace
'SyntaxError' Generic.Error
': ' Text
'EOL while scanning string literal' Name
'\n' Text.Whitespace
'\n' Text.Whitespace
'' Text
'>>> ' Generic.Prompt
'exec' Name
'(' Punctuation
"'" Literal.String.Single
'"' Literal.String.Single
"'" Literal.String.Single
')' Punctuation
'\n' Text.Whitespace
'Traceback (most recent call last):\n' Generic.Traceback
' File ' Text
'"<stdin>"' Name.Builtin
', line ' Text
'1' Literal.Number
', in ' Text
'<module>' Name
'\n' Text.Whitespace
' File ' Text
'"<string>"' Name.Builtin
', line ' Text
'1' Literal.Number
', in ' Text
'<module>' Name
'\n' Text.Whitespace
' ' Text.Whitespace
'"' Literal.String.Double
'\n' Text.Whitespace
' ' Text.Whitespace
'^' Punctuation.Marker
'\n' Text.Whitespace
'SyntaxError' Generic.Error
': ' Text
'EOL while scanning string literal' Name
'\n' Text.Whitespace