`comptime "<source>"` runs catscript inside the compiler, in an embedded
VM created lazily and shared for the whole compilation:
- expression position: the result value is baked into the program as a
constant (`local x = comptime "return 6 * 7"` -> x is 42).
- statement position: runs for side effects (compile-time globals) and
the value is discarded.
- errors raised at compile time surface as normal compile errors
("line N: comptime: boom").
- the embedded VM is freed at the end of compilation.
This reuses the existing interpreter, which is why it is cheap: the
language already has a VM to embed. tests/comptime.cat + suite block.
Suite 141 -> 144.
Add nominal interface declarations with structural, runtime checking
(the owner asked for the operator AND the runtime check).
- lexer: `interface` and `is` are keywords; `implements` is a soft
keyword (matched by text in the class clause) so the `implements()`
stdlib function is not shadowed.
- `interface NAME [extends BASE] <function m() end> end` builds a table
tagged `__interface`; members name the required methods (with an
optional default body, shared via `__index`). Interface inheritance
follows `__index`.
- class: `class C [extends B] [implements I, ...]` -- after the class
global is set, `__implements_check` runs and raises if the class does
not satisfy each declared interface.
- new opcode `IS` (`obj is iface`): structural membership test, and it
degrades to an exact type (vtable) match when the right side is not an
interface, so `x is SomeClass` reads naturally. Backed by
`cat_value_is()`.
- stdlib: `implements(obj, iface)` (the same test as a function).
- tests/interface.cat + suite block: interface satisfaction, interface
inheritance, duck typing (no `implements` needed), and a missing
method failing. Suite 130 -> 136, all green.
- std/ layout: std/lang/{lexer,parser,checker,compiler}.cat moved from src/catscript
- std/io/io.cat, std/fs/fs.cat, std/math/math.cat modules
- use "path.cat": import another unit (compile+run in the same VM)
- class NAME [extends BASE] ... end: methods, inheritance via __index,
default new constructor (runs optional init), tables are callable
- examples/classes.cat, tests/std.cat; 48/48 tests
- Modelo de objetos Cat_Value + vtable (interfaces abstratas)
- VM de bytecode, sem GIL (VM por-thread, nativas como valores)
- Stdlib com TOML embutido (toml_parse/toml_encode)
- Família de arquivos: AbstractFile (abstrata), File::open, StringIO, BytesIO
- Front-end (lexer/parser/checker/compiler) implementado em catscript
- cpk (cat package manager) como primeiro programa; manifest package.toml
- Type hints advisory, inclusive DynSized() e sentinel_sized<...>
- 25/25 testes passando (make test)