Repository navigation
RFM: v2 lexer carries no layout, so a newline before '-' merges two statements silently - #12769
Merged
Merged
Conversation
…ator merges silently Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Files one
gunbc.recurring_failure_moderow, and nothing else.The class: a statement followed by a line that begins with
-is one binary expression in v2 (xthen-1becomesx - 1). The seed refuses that source as ambiguous (v1.compiler.parseis_ambiguous_prefix_infix_newline_boundary). So the parsers disagree, and v2's reading is silently different code.Why it's a lexer-model gap, not a production fix:
v2.std.compilers.lexingTokencarries no layout, and the dag lex rules emit no newline token. No grammar production can tellx - 1fromxnewline-1, and a parser special case would be a second, positional authority for a fact the token stream doesn't carry.Scope: only operators that can also start an expression (today
-, the seed'soperator_continuation_dual_role_excluded_symbols). Infix-only operators can't begin a statement, so they aren't this class.Rung: silent wrongness. The ceiling is structurally guaranteed, and the trigger is that the token stream carries layout and the grammar refuses a newline-preceded dual-role operator at an operand boundary, with a typed
ParseRefusalReason.This row gates the block-headed left-operand repair (quiet-gull-780's lane): that change would add block statements to the population, so it waits on this row's trigger.
🤖 Generated with Claude Code