|
x-engine-c v0.2.13
The C engine for x-lang
|
Command-line interface, file inclusion, and interpreter entry point. More...
#include "x-eval.h"#include "x-heap.h"#include "x-prim.h"#include "x-type/buffer.h"#include "x-type/char.h"#include "x-type/err.h"#include "x-type/comment.h"#include "x-type/int.h"#include "x-type/list.h"#include "x-type/operative.h"#include "x-type/prim.h"#include "x-type/procedure.h"#include "x-type/str.h"#include "x-type/symbol.h"#include "x-type/whitespace.h"Macros | |
| #define | _GNU_SOURCE |
| #define | X_RELEASE "dev" |
Functions | |
| x_obj_t * | init (x_obj_t *p_base, x_char_t *buffer) |
| int | main (int argc, char *argv[]) |
Command-line interface, file inclusion, and interpreter entry point.
| #define _GNU_SOURCE |
| #define X_RELEASE "dev" |
Initialize the interpreter.
Creates the base object, registers all built-in types and primitives, sets up the read buffer, and optionally binds the syscall and include primitives (when X_SYSCALL / X_INCLUDE are defined).
| p_base | x_obj_t* – Ignored (always creates a fresh base) |
| buffer | x_char_t* – Pre-allocated read buffer |
| int main | ( | int | argc, |
| char * | argv[] | ||
| ) |
CLI entry point.
Initializes the interpreter, records the stack base for conservative GC scanning, binds command-line arguments as the x-lang args list, binds x-machine, x-version and x-release platform constants, then enters the REPL.
| argc | int – Argument count |
| argv | char*[] – Argument vector |