Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ef940de

Browse filesBrowse files
authored
gh-118235: Skip RAISE_SYNTAX_ERROR rules in the grammar spec (GH-118237)
1 parent 09c2947 commit ef940de
Copy full SHA for ef940de

File tree

Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-0
lines changed

‎Doc/tools/extensions/peg_highlight.py

Copy file name to clipboardExpand all lines: Doc/tools/extensions/peg_highlight.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class PEGLexer(RegexLexer):
1616
- Rule types
1717
- Rule options
1818
- Rules named `invalid_*` or `incorrect_*`
19+
- Rules with `RAISE_SYNTAX_ERROR`
1920
"""
2021

2122
name = "PEG"
@@ -59,6 +60,7 @@ class PEGLexer(RegexLexer):
5960
(r"^(\s+\|\s+.*invalid_\w+.*\n)", bygroups(None)),
6061
(r"^(\s+\|\s+.*incorrect_\w+.*\n)", bygroups(None)),
6162
(r"^(#.*invalid syntax.*(?:.|\n)*)", bygroups(None),),
63+
(r"^(\s+\|\s+.*\{[^}]*RAISE_SYNTAX_ERROR[^}]*\})\n", bygroups(None)),
6264
],
6365
"root": [
6466
include("invalids"),

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.