Commit Graph

12 Commits

Author SHA1 Message Date
Christoffer Lerno
3c15e495dd Add macro arguments &foo $foo #foo.
C ABI compatibility aarch64, win64, x86, x64
Added debug info
2020-11-22 22:16:19 +01:00
Christoffer Lerno
4222f2731e &&temp operator. Macro evaluation. 2020-10-16 18:11:30 +02:00
Christoffer Lerno
77ccfc1f7c Added CT_SWITCH parsing in top level. Nil changed to null. Parsing more in line with grammar. Parse type as expressions. Zero init by default for locals. Corrected bool/fp conversion. Add memcpy pass to fix issue with value load/stores. 2020-09-21 11:38:12 +02:00
Christoffer Lerno
8586bf3f8d Constants are now variables. Constant compile time constants are typeless and act as #define and are now also correctly parsed. Enums are also correctly lowered. And expressions are copied when inlining constants. Compile time ints can no longer be bitnegated. 2020-07-29 22:08:47 +02:00
Christoffer Lerno
90ab4f07b9 Corrected ptr->bool conversion. Avoid checking function body if function is invalid. Switch defer test cases. 2020-07-28 17:37:48 +02:00
Christoffer Lerno
a533cbb1a7 Fixes to tester for multiple file support. 2020-07-27 11:40:45 +02:00
Christoffer Lerno
7b7abf5d4a Fixes to defer, allowing break in defer (instead of continue). Fixed bug in PTR->BOOL cast. Extended test system to support multi files and codegen. 2020-07-27 11:40:45 +02:00
Christoffer Lerno
75dd644e52 Corrected parsing for incremental arrays. Correctly handle failed declarations. More tests. 2020-07-25 21:54:32 +02:00
Christoffer Lerno
34c7df9ee1 Fixed multi line error reporting for tokens. Handle infinite empty for loops. Changed cast syntax to "cast(foo as Foo)". Completed enum casts. Added more tests. 2020-07-25 21:54:32 +02:00
Christoffer Lerno
bd68380f06 Fixes to compile time integer conversions to to unsigned values, detecting negative values. Require cast on int -> pointer cast. Fixed check on array underflow. More tests. 2020-07-25 02:43:06 +02:00
Christoffer Lerno
ed01616f1e Changed how structs/unions are parsed so that recovery becomes more robust. Allow for more complex error data. Fixed recursive structs/unions. Corrected prefix precedence rules. Begin work on checking initializer constant-ness. Fixed error on failed arithmetic promotion. Added checks on constant overflow of sub/add/mult. Allow "current_module_name::x" to refer to globals. Added many tests. 2020-07-23 18:04:18 +02:00
Christoffer Lerno
f45d6ef84b Fix, separate out the function pass from the decl pass. Diagnose non-visible symbols as not visible rather than missing. Fix crash when module identifier is incorrect. !! operator added. New character literal parsing. Added simple test framework. 2020-07-21 23:43:28 +02:00