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
232632b74e
Add section with (incomplete) checking for mach-o
2021-08-18 22:28:43 +02:00
Christoffer Lerno
2246b641b1
Fix stack overwrite.
2021-07-30 00:18:30 +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
2778adbcb9
Fix bug #208
2021-07-18 18:53:00 +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
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
3a75032ba9
Workaround for GCC warning.
2021-06-11 18:39:48 +02:00
Christoffer Lerno
117cc6339b
Add data to end of VHeader.
2021-06-11 17:35:44 +02:00
Christoffer Lerno
e650ae771f
Thread pool and some updated lib code.
2021-06-11 13:23:45 +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
1f676c135c
Removed func and rewrote typedefs.
2021-05-23 13:16:48 +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
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
21357c4fc1
Fix crash when having return value errors. Updated docs. Find and load builtin.c3 locate std lib.
2020-07-31 16:29:52 +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
Christoffer Lerno
dc86c21210
New failable based error handling. Labelled break/continue/next.
2020-07-09 13:07:08 +02:00
Christoffer Lerno
50c36789bf
Fixes bug handling chained && ||. Work towards more macro functionality. Correctly emit stdcall. Corrected character parsing in escaped string entries.
2020-06-11 15:45:58 +02:00
Christoffer Lerno
d8423eff56
Fix space at end of file.
2020-05-03 02:08:33 +02:00
Christoffer Lerno
373001fd12
Error -> errset (temporarily). Catch / throw now works, but it will not yet correctly handle defer.
2020-05-03 02:04:13 +02:00
Christoffer Lerno
400c38b95b
Use correct sizes and alignments. Fix designated initializers and literals. Added todo
2020-04-06 13:45:58 +02:00
Christoffer Lerno
2e3bbf119c
Lexer cleanup
2020-03-29 17:40:03 +02:00
Christoffer Lerno
7b4ed09517
Introduced a Lexer context, comment parsing now actually works properly. Token use in decl/ast/expr is moved to SourceRange instead. And the SourceRange used start/end, which is better than using start + len for many uses.
2020-01-25 17:56:17 +01:00
Christoffer Lerno
cdc1bfe267
Start using UnaryOp/PostUnaryOp ++/-- now works post/pre and also on pointers. Fix ++/-- on any number. Added examples. c3c now compiles files by default. Extended symbol resolution. Addition of 'extern'. Multi-level paths.
2020-01-16 21:28:13 +01:00
Christoffer Lerno
946ca18cee
Support for subscripts. Added helloworld.
2019-12-11 17:22:48 +01:00
Christoffer Lerno
fc3bd57ecf
Major type check rewrite. Fixed params to be writable. Conditionals work. Lots of assign operators fixed. Struct access works.
2019-12-08 16:52:29 +01:00
Christoffer Lerno
aee3f99ea7
Added some codegen & .o generation and (hopefully correct) optimization. Hacked strings in together with i++/i--. Fixed up parsing of strings supporting \u \U \x => UTF8
2019-11-27 16:16:44 +01:00
Christoffer Lerno
990918b609
LLVM Codegen
2019-11-20 17:09:25 +01:00
Christoffer Lerno
5f00d4c2bc
More parsing, start working on packages.
2019-09-16 12:34:23 +02:00
Christoffer Lerno
3b2051ea80
More casts done, bugs fixed, codegen expanded, correct ordering in codegen, if, label, goto, break, switch, continue, compile time if analysed,
2019-09-07 00:58:56 +02:00
Christoffer Lerno
0dba2b8569
Partial codegen
2019-09-04 12:51:01 +02:00
Christoffer Lerno
2eb91083a6
Refactor type handling, some extremely simple codegen, but mostly work on casts (not finished)
2019-09-01 01:58:21 +02:00
Christoffer Lerno
ebce81ad51
Parses most of C3.
2019-08-25 08:40:07 +02:00
Christoffer Lerno
386ef35f36
Started a bit on parsing. Picking pieces from Titanos and trying to do things better.
2019-07-31 23:19:45 +02:00
Christoffer Lerno
8f611a400d
Lexing up and running.
2019-07-27 17:20:31 +02:00