- 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)
21 lines
617 B
C
21 lines
617 B
C
/*
|
|
* cat/compiler.h -- source -> bytecode compiler.
|
|
*
|
|
* Naming rule: symbols here are cat_compiler_* / CAT_COMPILER_*.
|
|
*
|
|
* The compiler is a recursive-descent parser over the Lua-like syntax.
|
|
* It performs structural-typing checks only where cheap (nothing is
|
|
* nominal) and accepts optional `: type` hints, which are advisory.
|
|
*/
|
|
#ifndef CAT_COMPILER_H
|
|
#define CAT_COMPILER_H
|
|
|
|
#include "cat/bytecode.h"
|
|
#include "cat/error.h"
|
|
|
|
/* Compile `source` into a fresh top-level function. */
|
|
CAT_BYTECODE_Function *cat_compiler_compile(const char *source,
|
|
CAT_ERROR_Error *err);
|
|
|
|
#endif /* CAT_COMPILER_H */
|