Skip to content

Enforce recursion depth limits for ternary expressions in the Pratt parser. - #1497

Merged
dmitriplotnikov merged 2 commits into
masterfrom
pratt-parser-ternary-recursion-limit
Sep 23, 2026
Merged

dmitriplotnikov merged 2 commits into
masterfrom
pratt-parser-ternary-recursion-limit

Conversation

@dmitriplotnikov

Copy link
Copy Markdown
Collaborator

Enforce MaxRecursionDepth when parsing ternary conditional expressions (? :) in the Pratt parser by tracking recursion depth in parseTernary and terminating parseBinaryAndTernary once the recursion or recovery limit is exceeded.

Comment thread parser/pratt_parser.go Outdated
@dmitriplotnikov
dmitriplotnikov merged commit 634de42 into master Sep 23, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants