97 Commits

Author SHA1 Message Date
f8ee7cc66e Oh boy do I love formatting. 2025-03-26 18:16:13 -04:00
d699f492fa Updated to use the builtin functions list.
Wow, the type declaration for builtin_fns[] is cursed.

Also, first commit from zed :D.
2025-03-26 18:06:17 -04:00
18c61d86dc Fixed crash on unknown var name. 2025-03-11 17:56:04 +09:00
eaf65697de Reformatted comments to be more consistent & clear. 2025-03-03 10:15:39 -05:00
db6e591d77 Added back all the old functions. 2025-02-26 12:43:55 -05:00
58554e8727 Fixed some expression mishandling. 2025-02-25 08:17:17 -05:00
38c6a9113c Added sub to the builtin functions. 2025-02-25 08:04:43 -05:00
109bcb3fa5 Fixed function calls on builtin.
Random pointer indirection.
2025-02-25 07:56:25 -05:00
79b60e4853 Fixed name error handling. 2025-02-25 07:52:02 -05:00
8cab531129 Fixed memory error in exception printing.
Conflation between char* & char**.
2025-02-25 07:47:08 -05:00
eb3fbca030 Some things are broken.
EVERYTHING IS BROKEN
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA.
2025-02-15 11:03:51 -05:00
40b91b96bd Adds type infrastructure.
Only floats (nums) are available at the moment.
2025-02-08 11:01:56 -05:00
67f659e263 Merge branch 'master' into types. 2025-02-08 10:23:15 -05:00
b8ce193299 Scope works. 2025-02-08 10:21:22 -05:00
11401e75a7 Fixed. 2025-02-08 09:25:54 -05:00
3678940537 Adds preliminary type enums. 2025-02-07 17:29:30 -05:00
6cbc28e092 Maybe fixed some memory leaks.
I don't know cauase lsan isn't working.
2025-02-04 17:55:47 -05:00
408a5a46c0 Can set and ref vars in main scope.
One can now assign and reference variables in the main scope, as it has
been put in a block through the parser.

Also added some tests for this purpose.
2025-02-04 17:28:06 -05:00
fbabf71d64 Variable references in blocks now work.
:D :D :D
2025-02-04 17:00:28 -05:00
78e31c3e27 Fixed block parsing for real this time.
I am such an idiot, ast_block_data_init() just ignored the given array
lol.
2025-02-04 16:50:04 -05:00
be3baee74e Fixed dlists.
Also added tests.
2025-02-04 16:40:58 -05:00
d5a07fae56 Started adding scope.
Doesn't really do anything yet as blocks aren't fully implemented.
2025-02-04 11:30:45 -05:00
4fb73b3c6f Fixed word accumulator. 2025-02-03 13:02:47 -05:00
5d81054cf6 Added variable definitions. 2025-02-03 11:28:47 -05:00
a5a86dc080 Basic blocks now work. 2025-02-01 18:40:43 -05:00
70393ef9ae Started work on blocks and the hash table. 2025-02-01 11:01:01 -05:00
efac7f7747 Added hashtable header. 2025-01-31 18:10:01 -05:00
3fcffc81ad Merge branch 'variables'. 2025-01-25 10:13:25 -05:00
27e61471a8 Fixed some things. 2025-01-25 10:12:15 -05:00
1a2249a0da Fixed tests and Makefile for the last time. 2025-01-20 16:02:24 -05:00
8b01407374 Added initial support for variables.
They are now parsed correctly, though they cannot be defined manually
and all have a value of 42.42.
2025-01-20 14:47:58 -05:00
3ab2696705 Updated dstr sz. 2025-01-18 11:14:14 -05:00
4be71317b0 Fixed memory leaks. 2025-01-18 10:41:54 -05:00
1e11b5921d It all works! (except for mem leaks) 2025-01-18 09:42:28 -05:00
7343c3b9d9 Fixed some function parsing. 2025-01-17 11:49:51 -05:00
9e8410d4cf Parens. 2025-01-16 11:59:34 -05:00
bc0c4f33ad Cleaned up. 2025-01-14 15:11:20 -05:00
1098fa252f Added parenthesis.
Also updated some grammar rules for negatives to be more general.
2025-01-14 13:59:26 -05:00
d13bf883b5 Fixed some functions. 2025-01-11 11:05:26 -05:00
681e005a68 Generalized arithmetic functions
to arbitrary arguments.
2025-01-11 10:53:49 -05:00
2ce89fb39a Added arbitrary length functions. 2025-01-11 10:35:42 -05:00
0731e40e6a Fixed precedence. 2025-01-04 14:01:05 -05:00
1f2bca5028 Not sure. 2025-01-04 10:45:11 -05:00
9a9e5cd3e0 Fixed parsing of negative numbers. 2025-01-04 09:53:39 -05:00
e05ebeef2a Added the ability to call infix function backend. 2024-12-28 18:59:04 -05:00
bdca40bae4 Made the infix ops call the normal functions. 2024-12-28 18:42:37 -05:00
b4cd46a1e7 Added division. 2024-12-28 18:39:33 -05:00
c7a9c8215c Reorganized functions, consolidated. 2024-12-28 11:54:58 -05:00
ca4cf2cd68 Finished Unity test support.
Not really, it fails to build tests sometimes and I have no idea why.
2024-12-28 11:52:59 -05:00
e19fc8820a Added Unity in test. 2024-12-28 09:30:35 -05:00