diff options
| author | LLLL Colonq <llll@colonq> | 2026-07-09 23:51:55 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2026-07-09 23:51:55 -0400 |
| commit | 2bdcaf319b1d74ffbaccf08a58336f804761beab (patch) | |
| tree | c21de6df74ec79b5574ad2b89fcc275d10847802 /pit/src/main.c | |
Refactor into monorepo
Diffstat (limited to 'pit/src/main.c')
| -rw-r--r-- | pit/src/main.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pit/src/main.c b/pit/src/main.c new file mode 100644 index 0000000..157ad87 --- /dev/null +++ b/pit/src/main.c @@ -0,0 +1,24 @@ +#include <stdlib.h> +#include <stdio.h> + +#include <lcq/pit/utils.h> +#include <lcq/pit/lexer.h> +#include <lcq/pit/parser.h> +#include <lcq/pit/runtime.h> +#include <lcq/pit/library.h> + +int main(int argc, char **argv) { + i64 sz = 256 * 1024 * 1024; + u8 *buf = malloc((size_t) sz); + pit_runtime *rt = pit_runtime_new(buf, sz); + pit_install_library_essential(rt); + pit_install_library_io(rt); + pit_install_library_plist(rt); + pit_install_library_alist(rt); + pit_install_library_bytestring(rt); + if (argc < 2) { + pit_repl(rt); + } else { + pit_load_file(rt, argv[1]); + } +} |
