Christoffer Lerno
a228eb020d
Allow splat in initializers.
2024-11-11 23:54:35 +01:00
Christoffer Lerno
c46933a81a
Refactor "splat" parsing.
2024-11-11 15:43:17 +01:00
Christoffer Lerno
746046c8c0
Fix bug where a > 0 ? f() : g() could cause a compiler crash if both returned void!.
2024-11-10 01:18:56 +01:00
Christoffer Lerno
acab95792f
Improve error message when incorrectly using Type as an rvalue.
2024-11-10 01:18:56 +01:00
Christoffer Lerno
b882265e52
Start work on 0.6.5
2024-11-10 01:18:56 +01:00
Christoffer Lerno
547f2ef189
Tighten up conversion rules for arrays and slices.
2024-11-10 01:16:01 +01:00
Christoffer Lerno
69004943a7
Update to 0.6.4.
2024-11-09 17:09:54 +01:00
Christoffer Lerno
658fb4b1f9
Updated for 0.6.4 release.
v0.6.4
2024-11-08 12:38:23 +01:00
Christoffer Lerno
e675b0c00a
Fix last test for LLVM20
2024-11-07 13:49:03 +01:00
Christoffer Lerno
95ac29559c
Fix some tests for LLVM20
2024-11-07 12:43:26 +01:00
konimarti
b7a095b4b4
Fix Formatter.floatformat and Object.to_format ( #1602 )
...
* fix: change float format specifier in Object.to_format
Fix the float format specifier in Object.to_format. If there is a float
stored in a Object such as 3.14, it would be printed out as 3 because
the format specifier is %d but should be %g.
* fix: print nan in floatformat
Fix floatformat to print 'nan' if float is nan. Currently,
io::printn(float.nan) will produce 'inf' instead of 'nan'.
2024-11-07 00:01:14 +01:00
Christoffer Lerno
08d1b29301
Add contracts on @catch / @ok. Taking the $typeof of a wildcard optional returns void!
2024-11-05 10:50:38 +01:00
Christoffer Lerno
741707273d
Add "prepare" target in project.json #1577
2024-11-04 22:46:19 +01:00
Tomas Kallup
bdd6ed0e83
Fix: Unify termios types for actions & flags
...
The type for `Tcflags` was used instead of the CInt (now `Tcactions`)
and vice versa.
2024-11-04 17:15:40 +01:00
konimarti
8154e275fa
encoding: implement RFC4648 base32 encoding ( #1596 )
...
Implement base32 encoding and decoding according to RFC 4648 with the
standard and extended hex alphabets. Add unit tests.
Link: https://www.rfc-editor.org/rfc/rfc4648
Signed-off-by: Koni Marti <koni.marti@gmail.com >
---------
Signed-off-by: Koni Marti <koni.marti@gmail.com >
2024-11-04 12:19:28 +01:00
Christoffer Lerno
6258cba79a
@tag on macros cannot be retrieved with tagof #1582
2024-11-04 02:51:58 +01:00
Waqar Ahmed
213831289a
Fix compile with gcc 14.2.1 ( #1594 )
...
* Fix compile with gcc 14.2.1 Fixes -Werror=maybe-uninitialized warnings
* Updated to use INVALID_PTR rather than NULL.
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2024-11-04 00:20:14 +01:00
Christoffer Lerno
ba34b45651
Fix LLVM 20 compilation
2024-11-03 23:52:48 +01:00
rexim
4be5c74798
Relative DESTINATION path when installing man page
...
This makes the install() function install the file with respect to
`CMAKE_INSTALL_PREFIX` which may not always be `/usr/local/` especially
when some people install the compiler locally in their `$HOME` folder.
https://cmake.org/cmake/help/latest/command/install.html
2024-11-03 23:20:15 +01:00
Christoffer Lerno
b06a611e69
Improve error message when using void aliases as variable storage type.
2024-11-01 14:56:29 +01:00
Christoffer Lerno
fd5b8d1374
Add bounds checking on List access.
2024-11-01 14:18:29 +01:00
Christoffer Lerno
4d84811629
Fixed test.
2024-10-31 21:41:50 +01:00
Christoffer Lerno
cd4fd02ee3
Sometimes generating introspection info would not be in the global scope causing a crash #1586 .
2024-10-31 21:27:46 +01:00
Ygor Pontelo
475972aecd
allow current directory as project ( #1580 )
...
* allow current directory as project
* avoid multiple underscores in module name
---------
Co-authored-by: Christoffer Lerno <christoffer@aegik.com >
2024-10-30 21:23:51 +01:00
Christoffer Lerno
b7a23e558a
Fixes with error handling recursive @tag #1583 .
2024-10-30 20:57:17 +01:00
Christoffer Lerno
827440686f
$define would occasionally not properly evaluate declarations it encountered.
2024-10-30 11:59:18 +01:00
aiko
7f70145f55
wrote manpage in c3c.1 and added manpage install to CMakeLists.txt
2024-10-28 22:37:56 +01:00
MohMaGen
0639659270
fix: remove requirements for pop_first.
2024-10-27 20:35:09 +01:00
Christoffer Lerno
4be08ee0bd
string::new_struct_to_str and io::struct_to_format to dump struct data. io::print will now print structs.
2024-10-26 21:00:07 +02:00
Christoffer Lerno
cc6a24cf80
Null-check function pointer invocation #1573 .
2024-10-26 18:41:47 +02:00
Christoffer Lerno
b187d5a3fc
Named vector component access would not fold at compile time. #1574
2024-10-26 13:22:35 +02:00
Christoffer Lerno
83f8d24892
Update sponsors. More comments in path.c3
2024-10-26 13:00:54 +02:00
Walther Chen
fd1898b70a
copy out keys also in HashMap.copy_keys ( #1569 )
...
* copy out keys also in HashMap.copy_keys
* test for copying keys out
2024-10-26 01:57:00 +02:00
Walther Chen
8ce63106b9
Update .editorconfig to reflect current style ( #1571 )
...
* Update .editorconfig to reflect current style
* .editorconfig use tabs for python
* update msvc_build_libraries.py from two-space to tab indent
* update test/src/tester.py from 4-space to tab indent
2024-10-25 17:44:32 +02:00
Christoffer Lerno
c0c571ffe0
Incorrect error message when $eval is provided an invalid string. #1570
2024-10-25 10:31:45 +02:00
Christoffer Lerno
d8f4da4d90
Incorporating change from #1568 and the other fix needed.
2024-10-23 23:48:27 +02:00
Matteo Cardinaletti
f02387073d
Json AST: Adding 'constants' and Improving 'globals' #1540 , #1541
2024-10-23 23:31:28 +02:00
Christoffer Lerno
d344cc6020
(uptr)&((Foo*)null).a incorrectly inserts a null check. #1544 .
...
Fix regression handling typedefs from generic modules.
2024-10-22 12:15:39 +02:00
Christoffer Lerno
9100638400
&self argument not implicitly null checked. #1556 .
2024-10-21 00:45:40 +02:00
Christoffer Lerno
d2085654a7
if (try foo) was handled incorrectly inside a defer.
2024-10-20 18:30:03 +02:00
Christoffer Lerno
78d5939d9d
Show error when declarations do not start with fn in interfaces. #1565 . Some added functionality to lists and time.
2024-10-18 17:10:00 +02:00
Christoffer Lerno
c013006671
Improve infer conversions on constants, e.g. ZString a = foo ? "a" : "b"; #1561
2024-10-17 01:20:52 +02:00
Fernando López Guevara
e09a9f0d80
chore(cmake): improve lld resolution on apple
2024-10-17 00:46:16 +02:00
Christoffer Lerno
705856d51a
- Disallow casting a void* to any or an interface, unless it is null.
...
- Defer resolution of declarations when looked up in `def` aliased #1559 .
2024-10-16 12:50:47 +02:00
Christoffer Lerno
4445b6c054
Improve error messages on expressions like var $type = int; #1553 .
2024-10-15 11:50:15 +02:00
Christoffer Lerno
cf03bc0a0a
Formatting fixes
2024-10-14 16:13:51 +02:00
Christoffer Lerno
f37f1769ae
c3.l grammar fixed.
2024-10-14 12:37:53 +02:00
Christoffer Lerno
31cd839063
Switch to <* *> docs. Fix issue with dynamically loaded C3 libs with other C3 code.
2024-10-14 02:14:34 +02:00
Christoffer Lerno
9f6a4eb300
Empty expression block would crash compiler with debug on #1554 .
2024-10-13 02:19:26 +02:00
PavelBlinnikov
6a2957faf7
fix: segfault in panic when statically compiled
...
Co-authored-by: RoadToLP <ilya.titoff2013@yandex.ru >
2024-10-12 22:18:38 +02:00