f8c322ef6c
mie: convert: add support for converting more value types
2025-04-22 15:20:43 +01:00
f0869b5ba0
lang: codegen: start implementing lambda generation
2025-04-21 21:11:45 +01:00
8023ea622a
mie: func name and args are now specified separately from func creation
...
func args are added manually using mie_func_add_arg, while the func's name
is specified when the func is added to a module, to allow the module to generate
a unique name.
2025-04-21 21:10:27 +01:00
8febd270ba
mie: convert: add spacing between function definitions
2025-04-21 21:10:14 +01:00
f220fc2f4b
lang: ast: fix nested lambdas not parsing correctly
2025-04-20 21:25:28 +01:00
4a258e2580
lang: codegen: implement fstring generation
2025-04-18 23:17:39 +01:00
2ddb065243
lang: codegen: disable CODEGEN_F_IGNORE_RESULT in expression generation
...
this flag caused some issues where the result of a message would
be ignored if it was the first operand in a larger expression.
2025-04-18 23:15:28 +01:00
78817b6b8c
update: use updated parser api to fix memory leaks
2025-04-17 23:16:16 +01:00
25c1fbd44b
lang: fix a bunch of memory leaks
2025-04-17 23:15:48 +01:00
11449b9919
lang: codegen: add support for non-fstrings to expr generator
2025-04-17 22:55:40 +01:00
9cce4bf541
mie: implement caching and emitting string data
2025-04-17 22:55:17 +01:00
abb7cfaf0e
mie: move mie_ctx to a separate header
2025-04-17 22:25:36 +01:00
7b8d77a264
lang: codegen: implement message-send code generation and global var references
2025-04-17 21:44:38 +01:00
a4504c0507
lang: ast: fix source formatting
2025-04-17 21:43:51 +01:00
8388dfeb79
mie: implement ir generation for message sending
2025-04-17 21:43:02 +01:00
6d8809d325
mie: implement generating extern global data items
2025-04-17 21:42:41 +01:00
51e07522e8
lang: ast: fix parens not allowing sub-keyword messages
...
previously, an expression like:
x arg1:a arg2:(c subArg:d).
were being parsed incorrectly. This expression was parsed
as single -arg1:arg2:subArg: message being sent to x. the
parentheses around the `c subArg:d` sub-expression were
being ignored.
now, this expression is correcly parsed as the value
of `c subArg:d` being passed as a parameter to the message
-arg1:arg2:
2025-04-17 21:38:31 +01:00
635d23d2e1
frontend: update codegen usage to only use pre-order ast traversal
2025-04-16 21:59:32 +01:00
f0e6237473
lang: codegen: redesign again to use purely pre-order ast traversal
2025-04-16 21:58:52 +01:00
95dbedefde
mie: builder: add function to get current block
2025-04-16 21:58:22 +01:00
a184ffce6f
doc: fix sample file permissions
2025-04-15 11:06:06 +01:00
ccb31ae545
doc: add var syntax samples
2025-04-15 11:05:52 +01:00
ae35c15f78
ivy.vim: add highlighting for var keyword
2025-04-15 11:05:02 +01:00
e430b7b2f1
lang: add var keyword for variable declarations
...
the var keyword allows greater control over what scope a
particular variable exists in. it clarifies whether a new
variable is being defined or an existing variable is being
assigned to. it will also facilitate the implementation of
global variables.
2025-04-15 11:02:47 +01:00
abebdb595a
frontend: add IR generation to compile command
2025-04-15 11:00:48 +01:00
8d462799dd
mie: add selector as a mie_value const type
2025-04-15 11:00:10 +01:00
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