Commit Graph

392 Commits

Author SHA1 Message Date
197ba14a4d asm: reader: implement constpool reader interface 2025-05-13 13:23:59 +01:00
179d0dddaa asm: assembler: fix write_selector not setting the number of args 2025-05-13 13:23:12 +01:00
ad23eec392 asm: assembler: don't include null terminator when writing string data 2025-05-13 13:22:46 +01:00
d5183aeb9f common: implement stringification of selectors 2025-05-13 13:20:11 +01:00
6307429bbf common: add missing status codes to ivy_status_to_string 2025-05-13 13:19:40 +01:00
c254495d3a frontend: implement disassemble command 2025-05-12 15:53:54 +01:00
656e24b8a7 frontend: implement debug printing of IVY_ASM_TOK_LABEL_REF lexer tokens 2025-05-12 15:53:43 +01:00
d746ea5234 lang: ast: fix nullptr deref in expr_finalise_arith when calculating ast node bounds 2025-05-12 15:53:06 +01:00
7580b714f0 ivy.vim: highlight $-prefixed label references 2025-05-12 15:52:25 +01:00
e3937ab092 doc: update iasm sample to use $-prefixed label references 2025-05-12 15:51:57 +01:00
416472410b common: add bad format status code 2025-05-12 15:51:24 +01:00
8d9ae5f36a asm: implement object file reader 2025-05-12 15:51:03 +01:00
2e4d1e53f3 asm: fix misplaced padding breaking offset calculation in ivy_assembler_finish 2025-05-12 15:50:48 +01:00
fe23529c6b asm: implement instruction decoding 2025-05-12 15:49:53 +01:00
c1ba6e78bc asm: implement $-prefixed label references for branch instructions 2025-05-12 15:49:27 +01:00
497ba65440 meta: rename ivy-rt to ivy-vm 2025-05-09 14:01:41 +01:00
05df01ff1b frontend: compile: remove filepath printf output 2025-05-09 13:41:12 +01:00
de5cb6be42 diag: fix pretty write_underline writing line margin in bold 2025-05-09 13:40:09 +01:00
661014f49f lang: adjust for-loop diagnostic wording 2025-05-09 13:39:02 +01:00
1d4661f7a4 lang: ast: fix parser_push_diag not setting diag location 2025-05-09 13:38:38 +01:00
31deaea266 frontend: update parser api usage with diagnostic support 2025-05-08 22:33:18 +01:00
8c703199cf frontend: update lex token usage 2025-05-08 22:33:05 +01:00
b89c3bedc5 lang: ast: add diag for do keyword in inline for-loop 2025-05-08 22:32:23 +01:00
5f560d28a7 lang: ast: update arith parser to set ast node bounds 2025-05-08 22:31:37 +01:00
c12371f0ec lang: ast: add diag support to parser 2025-05-08 22:30:23 +01:00
a0f1931c00 lang: lex: update ivy_token to use ivy_char_cell 2025-05-08 22:27:13 +01:00
92f101e500 diag: adjust pretty print formatting 2025-05-08 22:24:50 +01:00
592acc693f common: add a row/column co-ordinate structure 2025-05-08 22:24:12 +01:00
ce8a12d4f7 frontend: update api usage with diagnostic support 2025-05-08 20:32:22 +01:00
a28874145c lang: lex: add diagnostic support 2025-05-08 20:31:55 +01:00
cc99e7440e lang: add diagnostic definitions 2025-05-08 20:31:40 +01:00
1977ae4fe8 diag: rename ivy_diag_set_line_source to ivy_diag_ctx_set_line_source 2025-05-08 20:30:21 +01:00
bb55bee7f8 common: implement s_get_row and s_get_name in ivy_file 2025-05-08 20:29:31 +01:00
9f963c5757 frontend: add token coordinates to print_lex_token output 2025-05-08 10:53:35 +01:00
475575f76f lang: codegen: add for-loop generator 2025-05-08 10:53:00 +01:00
c31638c3de doc: update simple example with for-loop 2025-05-08 10:52:18 +01:00
0cf7dd9780 test: add diagnostic test program 2025-05-08 10:49:32 +01:00
c459f50e67 meta: add ivy-diag library
ivy-diag is used for generating and emitting diagnostic messages during compilation.
2025-05-08 10:48:23 +01:00
8e8637882d common: add some new callbacks to ivy_line_source
these callbacks will be used to implement diagnostic messages.
2025-05-08 10:47:07 +01:00
1c3aff9ad3 lang: add start/end coordinates to lexer tokens 2025-04-28 22:53:21 +01:00
2cbbc4c349 doc: add a document describing potential non-obvious syntax errors
the errors documented here include cases where the error is detected
far away from where the actual malformed syntax is in the source file,
so any error message reported by the compiler needs to include enough
information to help the user find and resolve the error.
2025-04-28 17:00:51 +01:00
a94956ec78 mie.vim: add comparison and branch instruction highlighting 2025-04-28 15:51:53 +01:00
75b90cfcb9 test: update mie api usage to use new context parameter 2025-04-28 15:51:20 +01:00
de7d5c44cd lang: codegen: add missing ctx parameter to ivy_codegen_create prototype 2025-04-28 15:50:54 +01:00
ff136adbe7 frontend: compile: print ast nodes as they are passed to the code generator
when both -a and -i switches are specified, ast nodes will be printed as they
are passed to the code generator, rather than all at once /before/ code
generation.

this makes it easier to determine which ast node is causing a code generation
error.
2025-04-28 15:47:32 +01:00
7ba88b65f8 frontend: update mie api usage to use new context parameter 2025-04-28 15:47:24 +01:00
64d1015a3c lang: codegen: implement cond-group code generation 2025-04-28 15:44:44 +01:00
6af9b62b88 mie: implement comparison and branch instruction generation 2025-04-28 15:41:31 +01:00
1431cb7b47 mie: ctx is now used to query the type of a value
this allows value get_type callbacks to use mie_ctx to obtain mie_type pointers,
rather than having to define their own static versions of the type structs.
2025-04-28 15:40:32 +01:00
cbec21b90f lang: implement elif keyword for more complex if-statements 2025-04-24 09:45:26 +01:00