-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
Implement the EXIT standard Forth word for early return from a word (user-defined function).
Motivation
Common in utility words with multiple exit conditions. Without EXIT, the only way to return early is to restructure the entire word with nested IF/ELSE/THEN, which is verbose and harder to read.
Implementation notes
EXITshould emitfunc.returnwith the current stack value at the point it appears in the word body, rather than only at the end.- The translator must ensure the stack state is valid at the
EXITpoint.
Related
Tracked as a high-impact gap in #16.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request