4587416ac9
frontend: repl: generate ir from input
2025-04-14 20:15:41 +01:00
670b7c5a33
lang: codegen: redesign codegen to use a stack-based state machine
2025-04-14 20:15:05 +01:00
5630132a69
mie: add some convenience functions for func, block, and builder
2025-04-14 20:14:44 +01:00
d4e0df0bda
mie: implement sub/mul/div instruction generation
2025-04-14 20:14:28 +01:00
1c8f1447e7
mie: fix a nullptr deref in mie_ctx cleanup
2025-04-14 20:13:13 +01:00
bcc0daa2d5
frontend: update ast iterator api usage
2025-04-14 12:25:49 +01:00
f123902215
frontend: add parameters to print_ast_node iterator function
...
the caller can now specify whether the nodes should be printed
in pre-order or post-order, and whether the output should be indented.
2025-04-14 12:24:56 +01:00
80e001cdc1
lang: add user args to ast iterator; combine pre/post-order traversal modes
...
the caller can now provide a pointer arg to ivy_ast_node_iterate, which will
be forwarded to the specified callback function each time it is called.
the iterator now behaves similarly to fts, in that it visits each node
in both pre-order and post-order, and indicates to the callback whether
the current iteration is pre- or post-order.
2025-04-14 12:24:42 +01:00
7a9fc1b11c
doc: remove class definition from Expressions sample
2025-04-14 09:53:27 +01:00
2cd78a64b0
lang: start implementing code generation (ast to ir) facility
2025-04-14 09:48:16 +01:00
c682cbb15a
frontend: update ast traversal api usage
2025-04-14 09:46:36 +01:00
fd91bb71c0
ast: implement postorder ast traversal
2025-04-14 09:46:27 +01:00
ae5e438207
common: add some more status codes
2025-04-14 09:43:31 +01:00
e1d7bebe9f
test: mie-ir: cleanup after ir generation
2025-04-13 19:25:41 +01:00
a7233a6cf6
mie: implement value cleanup
2025-04-13 19:25:23 +01:00
44aec9a121
doc: mie ir block labels are no longer prefixed with %
2025-04-13 18:35:06 +01:00
80110ec95e
mie: add ir builder test
2025-04-13 18:34:41 +01:00
edf5b18b32
mie: start implementing ir memory->text conversion
2025-04-13 18:34:28 +01:00
deb1232bf9
mie: implement more ir building functionality
2025-04-13 18:34:02 +01:00
7f0d8b87c5
mie: name_map can now generate unique names when given no hints
2025-04-11 14:12:53 +01:00
e379afb035
doc: add sample Mie IR for Person.im
2025-04-11 13:42:27 +01:00
db5843b66f
mie.vim: replace sym type name with atom
2025-04-11 13:42:10 +01:00
2b603c0d75
meta: add support for simple unit test
2025-04-11 13:41:33 +01:00
377444ef59
mie: implement value type initialiser functions
2025-04-11 13:40:54 +01:00
98d82de47a
mie: add name_map to generate unique value names
2025-04-11 13:40:37 +01:00
8dd67501bd
doc: update property/atom samples
2025-04-10 13:04:43 +01:00
4dec09352d
ivy.vim: update highlighting for properties and atoms
2025-04-10 13:04:29 +01:00
2235f9c0a9
lang: change symbols for properties and atoms to -> and $ respectively
2025-04-10 13:04:12 +01:00
8045872dc3
mie.vim: add highlighting for new instructions and keywords
2025-04-10 12:19:13 +01:00
5cd3eff2ed
mie: add lots more mie_value sub-types
2025-04-10 12:18:07 +01:00
ecc886c95a
doc: add sample of directly calling a block rvalue
2025-04-03 10:53:27 +01:00
e7f6d54fa2
mie: add value type hierarchy definitions
...
every construct within Mie, such as constants, instructions, functions, and translation units, are sub-types of the generic mie_value struct.
mie_value will facilitate iterating through the IR, as well as converting the IR to/from different formats.
2025-04-03 10:50:41 +01:00
df8d9689d1
lang: add null pointer check to arith_parse_left_paren
...
this fixes a crash that occurred when the call-operator was used on a lone ident in an expression.
2025-04-03 10:48:56 +01:00
6f9f299182
build: add mie to build system
2025-04-03 10:48:16 +01:00
962c1ae9d4
doc: update IR samples to new mie sub-directory and file extension
2025-04-03 10:47:24 +01:00
944ffcaea2
vim: pull IR syntax highlighting into separate vim plugin
2025-04-03 10:42:46 +01:00
0fee53f194
meta: add stub folder for mie ir builder/optimiser
2025-03-26 22:28:06 +00:00
ba1db96be3
doc: add lambda and call-operator sample code
2025-03-26 22:27:24 +00:00
b6bfdd0fd1
doc: adjust package messages; add more sample code
2025-03-26 22:27:06 +00:00
78b2eb23c3
lang: ast: implement () operator parsing
...
the () operator can be used to call lambdas in a more functional way than the standard
message-send syntax
for example, with a lambda stored in variable `x`:
x(a:2 b:6).
is equivalent to
x call(a:2 b:6).
2025-03-26 21:10:12 +00:00
0c500dc19b
lang: lex: add function for creating fake ident tokens
2025-03-26 21:09:50 +00:00
02ebb5c32b
vim: add syntax highlighting support for intermediate language
2025-01-27 19:19:29 +00:00
b4fd6a999b
doc: add intermediate representation language
2025-01-27 19:19:11 +00:00
251ed8c144
frontend: add coloured output for try-catch-finally AST nodes
2025-01-16 13:18:19 +00:00
5017e2e736
doc: add try-catch-finally example file
2025-01-16 13:17:46 +00:00
46d244a28d
lang: ast: implement parsing of try-catch-finally statements
2025-01-16 13:17:08 +00:00
143d61e329
lang: ast: add support for multiple block termination tokens
2025-01-16 13:15:18 +00:00
fa33336ed7
lang: lex: add finally keyword
2025-01-16 13:13:08 +00:00
22694f2d98
doc: replace . as self-index operator with ::
2025-01-15 21:11:58 +00:00
f5eaac1a4c
lang: fix underscopre not being treated as an expression start token
2025-01-15 21:11:19 +00:00