Repository navigation
Add fallthrough switch statements and expressions - #19
Merged
Merged
Conversation
Preserve switch and NILData findings while propagating the current master integration through the stacked pull request. TypeScript checking and all 124 extension unit tests pass.
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.
Ny and Matrix now provide switch statements and expressions with C++-style fallthrough. The selector evaluates once, dispatch enters the matching case (or a default in any position), and execution continues through subsequent case bodies until an explicit exit. Ny yields values with
break value; Matrix usesstop switching with value. Existingmatch/considerbehavior is unchanged.The shared compiler checks case identity, result types, lexical scopes, ownership and exit targets. Native and VM lowering preserve cleanup when yielding or returning from nested expressions. This also fixes forward/dotted enum resolution, aggregate construction interrupted by a return, and callable control-flow scope isolation. Unsafe loop exits across an unfinished value switch are rejected with a diagnostic; the initial label profile supports integers, booleans, text, Ny characters and wholly payload-free enums.
The change includes language-server indexing/completion, VS Code highlighting/snippets, the language reference, NIL-0021 and the next-version findings log. This PR is stacked on #18.
Validation: