Repository navigation
Read nobreak and break as prefixes, so nobreak { opens a block whose locals stay visible - #401
Merged
Merged
Conversation
…locals stay visible
…command position, completion, mixed-model separators
…nsole highlighter's prefix lists too
…efore browse in the Windows console
Contributor
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 29 minutes. View limit details
|
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.
nobreak {wasn't read as a block.nobreakandbreakweren't known prefixes, sonobreak {parsed as a commandnobreakfollowed by a stray{. The block's body was then misread: locals set inside it were reported as undefined after the}, which is common in base ados (nobreak { local rc = _rc }…exitrc'`).Checked in StataMP 18:
nobreak {,break {,capture noisily break {andquietly nobreak {open blocks whose locals are visible after}.nobreak local s = 10andbreak local t = 11work as prefixes.nobreak * noteandbreak * noteare comments.nobrea,breaandNOBREAKare unrecognized, so neither word has an abbreviation.Both words are now prefixes everywhere Sight skips prefixes:
PREFIX_COMMANDS, which feeds the star-comment rule too);SINGLE_LINE_PREFIX_COMMANDS);framesubcommands after the prefix);||exemption;c_localprogram-call detection;browserewrite.Not changed: Stata rejects
nobreak:, but Sight still accepts it without a diagnostic. There's no diagnostic for misused prefix colons, and adding one is a separate change.Proof: on Stata's 3,780 base ados, 5,195 diagnostics are removed, including 4,048 false
UNDEFINED_MACRO, 805OUT_OF_SCOPE_SYMBOL, 322OPEN_BRACE_ALONEand 12 false "Missingend". 66 are added:EMBEDDED_BLOCK_ENDS_PROGRAM, from a separate lexer bug:mata :ormata: ///one-liners inside the newly readnobreakblocks. A follow-up PR fixes it.syntaxthat defines it.Each new test fails on the commit before it. Typecheck, lint, and
bun test ./testspass.Reviewed with sol-loop: 5 rounds with gpt-6.1-sol. Sol verdict: approved
Created with Claude Opus 5.5 in T3 Code.