generators/iterators, raise/try/except, and slot-based object layout

- VM refactor: resumable CAT_VM_Frame (ip/sp/locals/handlers)
- yield/next/generators: calling a yield-function returns a generator
- for..in over any iterator, ends on explicit exhaustion status
- raise/try/except: structured error values, nearest-handler unwinding
- slots: C-declared member layout (offsetof), PyTypeObject/tp_members style
- File now exposes path/mode/closed via slots
- examples: generators.cat, errors.cat, slots.cat; 40/40 tests
This commit is contained in:
Minus committed 2026-11-16 01:48:47 +00:00
1 parent 52d118211f
commit 3c20496c78
19 files changed
+978 -99

No files matched your search

+1
View File
@@ -45,6 +45,7 @@ SRCS := \
src/cat/types/function.c \
src/cat/types/native.c \
src/cat/types/file.c \
src/cat/types/generator.c \
src/cat/stdlib/stdlib.c \
src/cat/stdlib/toml.c \
src/cat/stdlib/build.c