Commit Graph

118 Commits

Author SHA1 Message Date
Christoffer Lerno
fdcc189f41 Complete missing functionality with $nameof / $extnameof / $qnameof 2021-08-22 18:44:26 +02:00
Christoffer Lerno
f198e6c53a Added multi line strings raw strings. This also somewhat improves error reporting on strings. 2021-08-21 21:50:41 +02:00
Christoffer Lerno
64f20da080 Better handling of void/void*, unified local/global var analysis. Native base64 / hex data array (needs more checks) 2021-08-20 10:29:17 +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
0a53c0c3a5 Bug where constant "kind" was not propagated through constant folding. 2021-08-11 20:29:17 +02:00
Christoffer Lerno
da76777ee4 Fixes to aarch64 float struct return. Missing byval and align on calls. This *breaks* try-catch. 2021-08-11 19:17:45 +02:00
Christoffer Lerno
991f24d06a Added chained unwrap test and fixed the same. 2021-08-03 19:57:44 +02:00
Christoffer Lerno
c12cba67a8 Fix of try(...) { ... } and failable state on function call. 2021-08-03 19:57:44 +02:00
Christoffer Lerno
490dd65664 Add attributes to call site. @inline, @noinline to calls #250 2021-08-03 12:02:36 +02:00
Christoffer Lerno
78425ff5f2 Initial work on foreach overloading. Fixes a bug in indirect return values. Unifies call analysis. 2021-08-02 22:55:11 +02:00
Christoffer Lerno
ec612eea67 Added some explicit casts. Added sret at call site. 2021-07-29 16:42:20 +02:00
Christoffer Lerno
ce6e59483f Unified function and macro call analysis. 2021-07-28 17:20:19 +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
f14343f052 Fix :( 2021-07-22 19:01:17 +02:00
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
89d831fc18 Remove debug printout unless explicitly required. Add compile-only option. 2021-07-19 14:10:31 +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
917f00bb7a Support $typeof, removing the old typeof 2021-07-18 18:36:19 +02:00
Christoffer Lerno
26d976d0bd Fix Foo! syntactic sugar. 2021-07-17 20:59:29 +02:00
Christoffer Lerno
b091cdec78 Change nan / infinity. 2021-07-16 22:46:40 +02:00
Christoffer Lerno
afd39c4d4d Add inf and nan. 2021-07-16 00:05:09 +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
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
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
9a202e3c3d Remove predefined c type aliases. 2021-06-24 01:11:57 +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
95f39f42eb Fix nasty bug where the node copies did not get a proper id. 2021-05-31 21:11:10 +02:00
Christoffer Lerno
cf58da4a3c Remove the complex type. 2021-05-30 21:44:44 +02:00
Christoffer Lerno
d9566ef894 Generic modules are back, slightly different. 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
dbb067a005 Cleanup. 2021-05-23 21:32:32 +02:00
Christoffer Lerno
1f676c135c Removed func and rewrote typedefs. 2021-05-23 13:16:48 +02:00
Christoffer Lerno
90c988cc1f Fix issue with unifying void returns. 2021-05-20 00:12:58 +02:00
Christoffer Lerno
216467cbf8 Added alternative cast syntax: (type)(expr) 2021-05-18 14:57:41 +02:00
Christoffer Lerno
3c4233f4d4 Fixes to failable return from expression and macro blocks. Allow division by float zero. Correct type promotion from compile time float. 2021-05-17 21:17:46 +02:00
Christoffer Lerno
460c0d04d7 Generic modules. 2021-05-12 17:25:59 +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
Christoffer Lerno
0e076234ca Set stdlib library for testing and profit. Fix bugs when using void* to step. Make constants private linkage. Compare pointers using unsigned comparison without conversion. Use manual ptrdiff code. Fix issue returning "void!". Unify pointers when doing Foo* - void*. Allow comparing for example void* < Foo* 2021-04-29 03:12:25 +02:00