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:
Generated
+3
-3
@@ -1589,7 +1589,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
||||
|
||||
[[package]]
|
||||
name = "wafer"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"clap",
|
||||
@@ -1600,7 +1600,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wafer-core"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"insta",
|
||||
@@ -1615,7 +1615,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wafer-web"
|
||||
version = "0.2.5"
|
||||
version = "0.2.6"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"js-sys",
|
||||
|
||||
Reference in New Issue
Block a user