28 mpz_init_set(node->
digit, digit);
75 node->
print = operand;
CT_BROKER_API arena_t * ctx_get_ast_arena(const scan_t *scan)
CT_NODISCARD CT_SCAN_API node_t * node_new(const scan_t *scan, where_t where)
create a new node on the heap
#define ARENA_IDENTIFY(ptr, name, parent, arena)
rename and reparent a pointer in a custom allocator
#define ARENA_MALLOC(size, name, parent, arena)
allocate memory from a custom allocator
#define CTASSERT(expr)
assert a condition, prints the condition as a message
binary_t
all binary operators
unary_t
all unary operators
compare_t
all comparison operators
pl0_t * pl0_assign(scan_t *scan, where_t where, const char *dst, pl0_t *src)
pl0_t * pl0_unary(scan_t *scan, where_t where, unary_t unary, pl0_t *operand)
pl0_t * pl0_odd(scan_t *scan, where_t where, pl0_t *operand)
pl0_t * pl0_digit(scan_t *scan, where_t where, mpz_t digit)
pl0_t * pl0_import(scan_t *scan, where_t where, vector_t *parts)
pl0_t * pl0_binary(scan_t *scan, where_t where, binary_t binary, pl0_t *lhs, pl0_t *rhs)
pl0_t * pl0_new(scan_t *scan, where_t where, pl0_type_t type)
pl0_t * pl0_call(scan_t *scan, where_t where, const char *procedure)
pl0_t * pl0_procedure(scan_t *scan, where_t where, const char *name, vector_t *locals, vector_t *body)
pl0_t * pl0_loop(scan_t *scan, where_t where, pl0_t *cond, pl0_t *body)
pl0_t * pl0_print(scan_t *scan, where_t where, pl0_t *operand)
pl0_t * pl0_compare(scan_t *scan, where_t where, compare_t compare, pl0_t *lhs, pl0_t *rhs)
pl0_t * pl0_module(scan_t *scan, where_t where, const vector_t *mod, const vector_t *imports, const vector_t *consts, const vector_t *globals, const vector_t *procs, pl0_t *entry)
pl0_t * pl0_stmts(scan_t *scan, where_t where, vector_t *stmts)
pl0_t * pl0_value(scan_t *scan, where_t where, const char *name, pl0_t *value)
pl0_t * pl0_branch(scan_t *scan, where_t where, pl0_t *cond, pl0_t *then)
pl0_t * pl0_ident(scan_t *scan, where_t where, const char *ident)
a generic vector of pointers
a location inside a scanner locations are inclusive and 0-based