fix(core): silent ABORT, and name the compile-only condition
Two reporting bugs found from the browser shell. An uncaught ABORT printed 'ABORT (throw -1)'. The standard defines ABORT as 'empty the data stack and perform the function of QUIT', and QUIT displays no message; gforth and SwiftForth are both silent. It now takes the same silent path QUIT got in 0.2.5. CATCH still reports -1 and still restores the stack depth, and ABORT" still prints its text -- different word, different code (-2). Compile-only constructs used in interpretation state claimed to be an 'unknown word', which is misleading for a word the system obviously knows: ABORT", IF, THEN, LOOP, LITERAL, RECURSE and friends. They now report 'interpreting a compile-only word: <name> (throw -14)', the standard condition both reference engines give. The check reuses the existing INTERPRETER_TOKENS table at the point where interpretation has already failed, so a genuine typo still reports 'unknown word'. Ships as v0.2.6.
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ members = ["crates/*"]
|
||||
resolver = "2"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
edition = "2024"
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/ok2/wafer"
|
||||
|
||||
Reference in New Issue
Block a user