/* * 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 */