summaryrefslogtreecommitdiff
path: root/tests/examplefiles/pytb/syntax_error.pytb
diff options
context:
space:
mode:
authorJean-Abou-Samra <37271310+Jean-Abou-Samra@users.noreply.github.com>2021-07-06 22:20:03 +0200
committerGitHub <noreply@github.com>2021-07-06 22:20:03 +0200
commit2cb532d83dbcd022af413a299679e3018af8b98a (patch)
tree795cf31e03a4c5194e9de968a4780b1200a56b92 /tests/examplefiles/pytb/syntax_error.pytb
parentf0ff1bad7122f2604c54401b7ef1547bbeb4260f (diff)
downloadpygments-git-2cb532d83dbcd022af413a299679e3018af8b98a.tar.gz
Support error locations in Python tracebacks (#1852)
Support both single carets for syntax errors (Python 2 and 3) and fine-grained error locations with several carets (Python 3.11+). Previously, the carets were highlighted as operators. This uses a new token, Token.Punctuation.Marker. For now, no style supports it specifically. In the future, styles might start differentiating it from Token.Punctuation. [Closes #1850.]
Diffstat (limited to 'tests/examplefiles/pytb/syntax_error.pytb')
-rw-r--r--tests/examplefiles/pytb/syntax_error.pytb4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/examplefiles/pytb/syntax_error.pytb b/tests/examplefiles/pytb/syntax_error.pytb
new file mode 100644
index 00000000..3525cee2
--- /dev/null
+++ b/tests/examplefiles/pytb/syntax_error.pytb
@@ -0,0 +1,4 @@
+ File "<stdin>", line 1
+ mismatch(]
+ ^
+SyntaxError: closing parenthesis ']' does not match opening parenthesis '('