Christoffer Lerno
c4aa366592
Use heuristic to determine the type to convert to for compile time types. Added parsing for generic
2021-07-22 18:45:39 +02:00
Christoffer Lerno
198e3c369c
Extension methods added. Some initial work on virtual.
2021-07-21 19:28:02 +02:00
Christoffer Lerno
46e39f883c
Assigning to $Type now works.
2021-07-20 23:36:53 +02:00
Christoffer Lerno
8568b9b079
Fix right -> left associativity for assignment.
2021-07-19 17:31:13 +02:00
Christoffer Lerno
28a0dec343
Fixes: Extname works on global variables. Bug with boolean in ternary in some cases. Global declarations would not parse attributes.
2021-07-19 17:10:13 +02:00
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
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
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
45a3c8ae50
Fix alignment on all indirect. Fixed incorrect preferred alignment. Added mingw regression tests.
2021-07-16 13:05:56 +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
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
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
9a6d8d7657
Corrected hex double literal parsing (although it's not 100% correct yet)
2021-07-12 23:45:34 +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
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
4ed2596164
Removes "yield"
2021-06-28 00:19:46 +02:00
Christoffer Lerno
1d0c2ab2b0
Unifies function and macro argument parsing. Removed generic and attribute parsing. Prepare removal of yield.
2021-06-27 23:09:37 +02:00
Christoffer Lerno
038ed7f9d5
Macro methods added.
2021-06-26 17:42:45 +02:00
Christoffer Lerno
9572c4afc9
Top level $if now uses $if: / $endif; Fix of boolean globals. Fix of $else: clause. Fix of $assert inside of $if
2021-06-24 18:01:59 +02:00
Christoffer Lerno
321ee81c9d
Complete removal of /+ +/
2021-06-24 01:29:53 +02:00
Christoffer Lerno
5a6cdd25ef
Introduced ${...} syntax for constants. Fixed issue where constants were not correctly handled for macros. /* */ comments are nesting. Added LINE, FUNC, FILE defines. Corrected shallow resolution of subarrays. Added int defines. Removed Vararray.
2021-06-24 00:59:25 +02:00
Christoffer Lerno
dafe0e6fb6
Updated scope code and variable tracking. Added trailing body macros.
2021-06-10 15:06:12 +02:00
Christoffer Lerno
9f545c3f89
Added bigger test for regression.
2021-06-01 10:08:51 +02:00
Christoffer Lerno
95f39f42eb
Fix nasty bug where the node copies did not get a proper id.
2021-05-31 21:11:10 +02:00
Christoffer Lerno
dd8b850544
Support for "static" keyword.
2021-05-30 16:30:16 +02:00
Christoffer Lerno
0605a8c500
Introduce "private" keyword and private modules / private import.
2021-05-30 16:30:16 +02:00
Christoffer Lerno
d9566ef894
Generic modules are back, slightly different.
2021-05-30 16:30:16 +02:00
Christoffer Lerno
97ac957cb7
"Public by default"
2021-05-30 16:30:16 +02:00
Christoffer Lerno
892c7e8874
Changed generic modules to internal templates.
2021-05-27 08:30:02 +02:00
Christoffer Lerno
cf82140a47
Adding min/max/elements to enums.
2021-05-23 23:55:10 +02:00
Christoffer Lerno
1f676c135c
Removed func and rewrote typedefs.
2021-05-23 13:16:48 +02:00
Christoffer Lerno
fb6d80b0f6
Removed implicitly created modules. Fix classification of arrays in x64. Fix cast with direct-pair. With test cases.
2021-05-19 17:27:59 +02:00
Christoffer Lerno
fc31c15914
Updated cast syntax in code samples.
2021-05-18 17:23:27 +02:00
Christoffer Lerno
216467cbf8
Added alternative cast syntax: (type)(expr)
2021-05-18 14:57:41 +02:00
Christoffer Lerno
460c0d04d7
Generic modules.
2021-05-12 17:25:59 +02:00
Christoffer Lerno
9b86b00834
Compilation is now done with each module compiled together.
2021-05-11 14:58:21 +02:00
Christoffer Lerno
f7919edb35
Split modules into generic and normal modules on the top level. Prepare for static. Change local -> static as keyword. Add private include. Remove old sub module search.
2021-05-09 19:26:05 +02:00