summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorPetr Viktorin <encukou@gmail.com>2024-04-26 09:01:30 (GMT)
committerGitHub <noreply@github.com>2024-04-26 09:01:30 (GMT)
commitef940dec409f0a9e4f353c6188990aeb3ad4ffb4 (patch)
treea51767b64c2ad6dbf0e41e42f140ea4d00c32819 /Doc
parent09c29475813ff2a763931fc0b45aaaef57cd2ac7 (diff)
downloadcpython-ef940dec409f0a9e4f353c6188990aeb3ad4ffb4.zip
cpython-ef940dec409f0a9e4f353c6188990aeb3ad4ffb4.tar.gz
cpython-ef940dec409f0a9e4f353c6188990aeb3ad4ffb4.tar.bz2
gh-118235: Skip RAISE_SYNTAX_ERROR rules in the grammar spec (GH-118237)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/tools/extensions/peg_highlight.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/tools/extensions/peg_highlight.py b/Doc/tools/extensions/peg_highlight.py
index 4bdc2ee..5ab5530 100644
--- a/Doc/tools/extensions/peg_highlight.py
+++ b/Doc/tools/extensions/peg_highlight.py
@@ -16,6 +16,7 @@ class PEGLexer(RegexLexer):
- Rule types
- Rule options
- Rules named `invalid_*` or `incorrect_*`
+ - Rules with `RAISE_SYNTAX_ERROR`
"""
name = "PEG"
@@ -59,6 +60,7 @@ class PEGLexer(RegexLexer):
(r"^(\s+\|\s+.*invalid_\w+.*\n)", bygroups(None)),
(r"^(\s+\|\s+.*incorrect_\w+.*\n)", bygroups(None)),
(r"^(#.*invalid syntax.*(?:.|\n)*)", bygroups(None),),
+ (r"^(\s+\|\s+.*\{[^}]*RAISE_SYNTAX_ERROR[^}]*\})\n", bygroups(None)),
],
"root": [
include("invalids"),