Commit Graph

362 Commits

Author SHA1 Message Date
Christoffer Lerno
d42193dbd6 Fixes the alloca alignment on x64 for alignment > 16. Improved indexing into ConstInitializer adding const indexing into a const array during compile time. Add a temporary enum values result. 2022-02-08 11:41:34 +01:00
Christoffer Lerno
ee32a5fd47 Added $stringify. Remove of editor_plugin folder. 2022-02-02 15:22:28 +01:00
Christoffer Lerno
06917f2e65 Added "guess a number". Fix CT enum / int comparison. Fix some array pointer decay scenarios. Infer type of expression blocks. Correctly merge anyerr. 2022-02-01 22:46:32 +01:00
Christoffer Lerno
ba66aaaf12 Foreach overload is now done using attributes (@operator(elementat), @operator(elementref) and @operator(len)) rather than reserved functions. 2022-01-29 16:45:03 +01:00
Christoffer Lerno
cf56825d26 Fixed bug when using indexing on a generic type. Made array::list::List work with [] and foreach. 2022-01-26 21:27:13 +01:00
Christoffer Lerno
e5bcb74822 Added levenshtein.c3 to working files. Fixes to reverse indexing. Added min/max functions. Tentatively removed "opaque" 2022-01-26 17:40:01 +01:00
Christoffer Lerno
2c5ae858b8 Re-add () to ct constructs. 2022-01-24 00:52:43 +01:00
Christoffer Lerno
ef95c1a630 Fix $switch. And make top level $switch work. 2022-01-24 00:01:54 +01:00
Christoffer Lerno
36e40e59cb Added enumset to stdlib. 2022-01-20 20:00:22 +01:00
Christoffer Lerno
dce33ba5b5 Fixing #380 where const aggregates were copied by value. 2022-01-20 16:52:28 +01:00
Christoffer Lerno
ec291d4a9d This allows testing optnum, optenum, errnum and resnum as alternatives to errtype. 2022-01-19 23:21:17 +01:00
Christoffer Lerno
1e56948a22 Prepare removing "func" 2022-01-18 14:15:44 +01:00
Christoffer Lerno
e4e8abbc6c Dev (#376)
Errno updates with errno for linux/win/macos. Updated $$ syntax to also match compiler constants.
2022-01-18 01:31:14 +01:00
Christoffer Lerno
3f60443d66 Update errno. 2022-01-17 22:28:06 +01:00
Christoffer Lerno
f53dd95aa7 Update errno. 2022-01-17 22:24:52 +01:00
Christoffer Lerno
1743036104 Added some File functionality. 2022-01-17 22:16:29 +01:00
Christoffer Lerno
a2fa61f58b Updated licensing information. 2022-01-17 17:18:22 +01:00
Christoffer Lerno
f509c85514 Update hello_world 2021-12-29 14:38:47 +01:00
thsm
1a9b8095b6 added {| |}, etc to vscode syntax highlighter 2021-12-22 00:41:36 +01:00
pyxel
012f258fa2 add vscode syntax plugin 2021-12-21 22:52:53 +01:00
Christoffer Lerno
4575e3dd8d Fix fseek/ftell to work correctly. 2021-12-20 00:23:21 +01:00
Christoffer Lerno
6d6d410d13 Update nano type/keywords. 2021-12-18 17:19:09 +01:00
Hanna
6b34a8c82e add kakoune editor resource 2021-12-18 17:00:30 +01:00
Christoffer Lerno
680b077eb1 Flexible array member added, zero sized structs removed. 2021-12-14 19:00:33 +01:00
Christoffer Lerno
8aa00b015b Add support from compiling c from c3c. 2021-12-09 23:38:57 +01:00
Christoffer Lerno
bc2d789c2e Filter \r before lexing. 2021-12-03 16:43:37 +01:00
Christoffer Lerno
974cd0acc5 Rollback global. 2021-11-17 10:37:23 +01:00
Christoffer Lerno
b52b42d4da Complete transition to fn. Introduce global/threadlocal 2021-11-16 17:46:44 +01:00
Christoffer Lerno
fb56d380cc Builtins work. Math library exposes some builtins. Volatile store / load. 2021-11-13 12:31:45 +01:00
Christoffer Lerno
aa239c6a87 Allow "fn" instead of "func". Rewrote $switch over types. 2021-10-20 16:30:45 +02:00
Christoffer Lerno
b4df56db54 Removed original_type, pure, removed bigint, added i128 type, lots of fixes to $Foo, reassigning ct type, catch/macro, "!", removed type inference. 2021-10-19 10:39:02 +02:00
Christoffer Lerno
0a4f35154a Addeded some hash functions. Fix of visibility resolution for macros. std lib is now loaded from a directory. 2021-09-22 10:27:10 +02:00
Christoffer Lerno
fb9be722bc Fix issue with default macro arguments. Test of ?? instead of else. Added libc 2021-09-20 22:25:01 +02:00
Christoffer Lerno
e4c7dde30b Fix of shadowing bug. Allow pointer and subarrays to be constant initialized. Compile time values may now pass around anything considered compile time constant. It's possible to index into an initializer list at compile time. (Some work still remains on this) 2021-09-18 01:13:42 +02:00
Christoffer Lerno
b87b67ebbb Factorial macro example. 2021-09-11 02:34:09 +02:00
Christoffer Lerno
17dcb742c6 Fixed codegen for subarray global initializers. Adding fasta example. 2021-09-11 00:44:35 +02:00
Christoffer Lerno
b7e423adc2 Update .len for subarray to not require () 2021-09-10 19:44:27 +02:00
Christoffer Lerno
0aef2810c8 Added fasta example. 2021-09-10 19:27:42 +02:00
Christoffer Lerno
2b2be6b491 Added mandelbrot example code. 2021-09-10 16:12:54 +02:00
Christoffer Lerno
49d13c23bb Fix issue with grouped expressions in macros. Adding spectral norml code example. 2021-09-10 15:47:31 +02:00
Christoffer Lerno
c76e8e0713 Added nbodies example 2021-09-10 10:30:20 +02:00
Christoffer Lerno
29b3535460 Added fannkuch example. 2021-09-10 09:20:27 +02:00
Christoffer Lerno
fd1eafe5bf Fix base64 and hash examples. 2021-09-08 23:54:56 +02:00
Christoffer Lerno
bb9e84d329 Make errors usable from other units. Order subarray elements correctly. Correct subarray -> pointer cast. Prevent unwrapping of catch in switch. 2021-08-31 18:12:30 +02:00
Christoffer Lerno
2ff5acc2a1 Allow constant strings as default values. 2021-08-31 13:03:12 +02:00
Christoffer Lerno
f180a0d44a Change anyerror { i64, i64 } -> i64. Cleaned up platform data and max tls / vector align. Initial work on bitstruct (just parsing). Updated try / catch semantics. 2021-08-18 17:31:09 +02:00
Christoffer Lerno
446396da4c Remove soft float accidentally turned on. 2021-08-16 00:25:41 +02:00
Christoffer Lerno
afeb555e2f Improved support for vectors that allows correct usage in C ABI.
To free keywords, half -> float16, i128 -> int128, u128 -> uint128, quad -> float128.
2021-08-10 22:45:53 +02:00
Christoffer Lerno
9f42ddb68d Fix foreach body copy. Moved deref / addr into special functions. Cleaned up access. Remove .sizeof .alignof .qnameof .nameof, create $qnameof $nameof 2021-07-26 09:30:35 +02:00
Christoffer Lerno
c149f14a1f Added iro grammar. 2021-07-20 15:01:04 +02:00