10 Commits

Author SHA1 Message Date
Aryadev Chavali
b391fe9a74 lexer/token: update tokeniser to recognise puts 2026-01-29 15:49:20 +00:00
Aryadev Chavali
d46ee32775 main: split off reading and usage function to its own unit 2026-01-29 04:12:33 +00:00
Aryadev Chavali
dc96e12145 parser -> lexer
That's the real purpose of this module; it's not really generating an
AST since ARL's syntax isn't tree like whatsoever.

The next stage will be something closer to an AST, in the sense we'll
be introducing:
- Syntactical analysis
- Type Checking
2026-01-29 03:43:04 +00:00
Aryadev Chavali
42ac4f6bbb lib/vec: vec_reset and vec_pop 2026-01-29 03:23:43 +00:00
Aryadev Chavali
7e3dd2679d parser/ast: Remove union name in ast_node_t
Destructures the names of the union into the namespace of the
structure itself; bit easier to use IMO.
2026-01-29 03:15:51 +00:00
Aryadev Chavali
8764b65aff parser: remove NIL as a known value
Not really needed or necessary.
2026-01-29 03:15:12 +00:00
Aryadev Chavali
84996130b7 base: Added some extra logging macros
LOG, LOG_ERR.  LOG_ERR will always compile to a /stderr/ print.  LOG,
on the other hand, may not actually do anything if VERBOSE_LOGS is
not 1.  By default it is 0, so it must be defined when compiling to
enable - hence the adjustment of the Makefile.
2026-01-28 08:59:29 +00:00
Aryadev Chavali
2dc0de78b5 parser/ast|parser: PRIMITIVE -> KNOWN
Primitive is a bit of a word conflict here; primitives are what we'd
expect our callables to be named eventually.  However, these parser
"primitives" are just well known symbols that we want to optimise the
representation of for later stages.  Thus, KNOWN is a bit better for
signalling intent then PRIMITIVE is.
2026-01-28 07:35:39 +00:00
Aryadev Chavali
947e05cdc8 parser/ast: update println -> putstr 2026-01-28 07:13:41 +00:00
Aryadev Chavali
76872179f9 *: Split off headers into their own folder
Main reason is so we don't have that stupid arl prefix directory in
our source code.  Now our source code is flat, and we can still
reference headers by linking from root.
2026-01-24 03:02:54 +00:00