Commit Graph

323 Commits

Author SHA1 Message Date
Christoffer Lerno
8ba2994caa Required parens code moved to semantic analysis. Make || and && have different levels since parens cannot be enforced. 2021-07-18 20:26:19 +02:00
Christoffer Lerno
ac2fd2dd71 Added tests for type methods on non struct/unions. 2021-07-18 19:00:16 +02:00
Christoffer Lerno
2778adbcb9 Fix bug #208 2021-07-18 18:53:00 +02:00
Christoffer Lerno
917f00bb7a Support $typeof, removing the old typeof 2021-07-18 18:36:19 +02:00
Christoffer Lerno
f60c1dd4a4 Fixes to the nano conf for errors. 2021-07-18 14:13:21 +02:00
Christoffer Lerno
f64c35214e Change error -> anyerr / errtype 2021-07-18 14:11:39 +02:00
Christoffer Lerno
e6b9efe850 Fixing parse of error type. 2021-07-18 13:44:16 +02:00
Christoffer Lerno
069dbe8238 Make it possible for globals and static variables to have failables. 2021-07-18 12:39:08 +02:00
Christoffer Lerno
26d976d0bd Fix Foo! syntactic sugar. 2021-07-17 20:59:29 +02:00
Christoffer Lerno
d578b249c2 Updated attributes and some cleaning of ABI info. 2021-07-17 18:09:31 +02:00
Christoffer Lerno
5fc937897a Check private module parsing. 2021-07-17 18:09:31 +02:00
Christoffer Lerno
1af27136fa Improved error messages on incorrect module name. Issue #209 2021-07-17 15:20:13 +02:00
kvk1920
429fb647fb CI testing (#234)
* run test in CI
* make CI run
* fix some issues with paths on Windows
* avoid using float80
* add mingw64 ci
* fix path issue in tests
* add lld for mingw64 CI
2021-07-17 10:30:19 +02:00
Christoffer Lerno
ebbe226a03 Added codestyle document. 2021-07-17 00:00:29 +02:00
Christoffer Lerno
b091cdec78 Change nan / infinity. 2021-07-16 22:46:40 +02:00
Christoffer Lerno
12ef7b2e66 Pick double / long double depending on availability. 2021-07-16 20:39:49 +02:00
Christoffer Lerno
306ce5b39b Pick double / long double depending on availability. 2021-07-16 20:36:46 +02:00
Christoffer Lerno
67d09cf7c6 Pick double / long double depending on availability. 2021-07-16 20:20:19 +02:00
Christoffer Lerno
46a4f8a7ae Added constants describing floating point types. 2021-07-16 17:48:31 +02:00
Christoffer Lerno
39ec9d9436 Pass NAN/INF as string to LLVM. 2021-07-16 16:41:47 +02:00
Christoffer Lerno
caecbebd0f Update float conversion into LLVM. 2021-07-16 15:21:56 +02:00
Christoffer Lerno
45a3c8ae50 Fix alignment on all indirect. Fixed incorrect preferred alignment. Added mingw regression tests. 2021-07-16 13:05:56 +02:00
Christoffer Lerno
11842e5dfa Is builtin should be : 1 2021-07-16 11:25:07 +02:00
Christoffer Lerno
22fb7b4bcc Fix bug in (x && y && z) codegen. 2021-07-16 11:18:33 +02:00
Christoffer Lerno
afd39c4d4d Add inf and nan. 2021-07-16 00:05:09 +02:00
Christoffer Lerno
cb9bcfe42a Added -z argument. 2021-07-15 11:48:06 +02:00
Christoffer Lerno
d93382d858 Add CChar to interop. 2021-07-15 01:32:05 +02:00
Christoffer Lerno
1948ae3fe2 Fix checks on float literal exceeding max, and implicit float conversions. 2021-07-15 01:17:18 +02:00
Christoffer Lerno
a18f668fc4 Updated error messages on failed binary arithmetic promotion. 2021-07-14 23:48:43 +02:00
Christoffer Lerno
150e205f13 Revert slice.len[] returns an usize from compint. 2021-07-14 15:16:16 +02:00
Christoffer Lerno
50a36baf34 array.len returns a compint and slice.len[] returns an usize from compint 2021-07-14 15:14:25 +02:00
kvk1920
9bd4568ef5 Windows compatibility (#223)
* MSYS2 CI
2021-07-14 14:19:27 +02:00
Christoffer Lerno
0111fe936e Adds missing alignment to sret. 2021-07-14 11:53:09 +02:00
Christoffer Lerno
89a1f62ea8 This improves error messages when using the wrong arguments for "define". Closes #221 2021-07-13 23:52:04 +02:00
Christoffer Lerno
c0d8f7ba90 Incorrect error message when trying to subtract incompatible types from each other. Also, allowing ulong - int should just work. Issue #222. 2021-07-13 23:26:08 +02:00
Christoffer Lerno
c94eacd26f Fixes issue where cont/break/next stack isn't pushed for expression blocks. 2021-07-13 16:09:45 +02:00
Christoffer Lerno
df311fa8be This addresses #218, bad error message lexing the exponent. 2021-07-13 13:39:38 +02:00
kvk1920
050382b68e Windows compatibility (#207)
* incorrect environment detection fixed
* use %zu instead of %ld for size_t
* fix rounding in integer division
* fix compiler error on Windows
* implement missed functions
* make linker available if MinGW environment is used
* make linker available under MSYS2 Clang64 and MSYS2 MinGW64
2021-07-13 12:59:55 +02:00
Christoffer Lerno
9a6d8d7657 Corrected hex double literal parsing (although it's not 100% correct yet) 2021-07-12 23:45:34 +02:00
Christoffer Lerno
a28502a6af Error on using "main" in a path. 2021-07-12 22:34:15 +02:00
Christoffer Lerno
9ee24b5846 Improve error message on import "foo", module "foo", and import statements out of order. 2021-07-12 21:07:14 +02:00
kvk1920
3173d09e56 incorrect environment detection fixed 2021-07-11 13:49:17 +02:00
Christoffer Lerno
9614b9e31f Fix incorrect handling of indirect returns in the ABI 2021-07-11 13:47:04 +02:00
Christoffer Lerno
2134a9f77b $offsetof added. 2021-07-11 01:22:21 +02:00
Christoffer Lerno
a5ce7c47ba Adding "require" precondition. Corrects inferred arrays and fixes so that it uses [*] everywhere. Distict type will now allow methods to be added to it. Added $alignof and $sizeof. 2021-07-09 23:57:35 +02:00
Christoffer Lerno
12ffeeaad7 Fixes to the cname patch. 2021-06-30 22:41:34 +02:00
Christoffer Lerno
e530869aeb Change "cname" to "extname" 2021-06-30 22:36:57 +02:00
Christoffer Lerno
fff08a47ac Add AARCH as "supported" 2021-06-30 11:52:25 +02:00
Christoffer Lerno
3c612abe26 Add AARCH64 missing max size for return. Allow 1 character module names. 2021-06-30 11:47:57 +02:00
gdm85
93062d8be0 Always build testproject as part of CI 2021-06-28 21:33:31 +02:00