mirror of
https://github.com/remko/waforth
synced 2025-01-18 22:26:39 +01:00
Implement BYE
This commit is contained in:
parent
ebf2e1c674
commit
83fa40a3b4
3 changed files with 255 additions and 240 deletions
|
@ -17,6 +17,7 @@
|
|||
#define ERR_QUIT 0x2
|
||||
#define ERR_ABORT 0x3
|
||||
#define ERR_EOI 0x4
|
||||
#define ERR_BYE 0x5
|
||||
|
||||
wasm_memory_t *memory;
|
||||
wasm_table_t *table;
|
||||
|
@ -207,6 +208,11 @@ int main(int argc, char *argv_main[]) {
|
|||
assert(trap == NULL);
|
||||
stopped = true;
|
||||
break;
|
||||
case ERR_BYE:
|
||||
assert(trap != NULL);
|
||||
wasm_trap_delete(trap);
|
||||
stopped = true;
|
||||
break;
|
||||
case ERR_UNKNOWN:
|
||||
assert(trap != NULL);
|
||||
print_trap(trap);
|
||||
|
|
486
src/waforth.wat
486
src/waforth.wat
File diff suppressed because it is too large
Load diff
|
@ -41,6 +41,7 @@ enum ErrorCode {
|
|||
Quit = 0x2, // QUIT was called
|
||||
Abort = 0x3, // ABORT or ABORT" was called
|
||||
EOI = 0x4, // No more input
|
||||
Bye = 0x5, // BYE was called
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue