Commit Graph

23 Commits

Author SHA1 Message Date
Christoffer Lerno
b2bfd87a06 Started work on ranges. Added weak/noreturn/inline/cname/stdcall/section/alignment attributes. Some work on subarrays. Fixes to throws. Function pointers work. 2020-05-20 14:22:22 +02:00
Christoffer Lerno
4a5b57c2d7 AST dump cleanup done. Leaving some TODOs. 2020-05-07 12:10:49 +02:00
Christoffer Lerno
d23c271289 Throw/catch works correctly with defer. 2020-05-03 16:45:16 +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
8e80091da4 Create CI 2020-04-22 16:07:42 +02:00
Christoffer Lerno
df0433d746 Fix fallthrough case handling. 2020-04-18 23:55:53 +02:00
Christoffer Lerno
982a9e7b58 Minor cleanup 2020-04-18 22:23:42 +02:00
Christoffer Lerno
6da6b0f571 Compound literal works properly. 2020-04-18 14:29:17 +02:00
Christoffer Lerno
6117a1be7c Lots of fixes and optimizations to structs. Now there are no unnecessary intermediary types. 2020-04-18 14:29:17 +02:00
Christoffer Lerno
f53b378b0c Adding trap on debug builds. 2020-04-09 13:47:23 +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
bbef467317 Codegen of enum and error 2020-04-04 01:28:15 +02:00
Christoffer Lerno
ded367399e Some work towards automated testing. Fixes to bigint. Removed implicit assign cast. Updated cast rules. Fixes *%=. Simplified case. Unified shift code. Major casts rework. Fixed error handling of pointer + integer adds. Removed &&= and ||=. Unified more expression handling and fixed bugs in sematic analysis on expressions. 2020-04-02 23:13:04 +02:00
Christoffer Lerno
b1aa64cdcc TypeInfo gained a span. Hex lexing fixed. Basic block returns fixed. Removal of Ast.exit. Enum parameter list parses. Enum analysis improved. Exit deduction improved. Switch over a bool allowed. Switch analysis improved. Added -% operator. Updated implicit casts. Use of bigint. Signed-unsigned comparisons. 2020-03-29 17:41:31 +02:00
Christoffer Lerno
f4b4bab947 Restructuring the parser & split parser into parts. Parsing more constructs now, like enums with extended syntax. Corrected handling of function block to be an expression. Added expression block codegen. 2020-03-29 17:40:42 +02:00
Christoffer Lerno
ebbea2ac42 Lookahead cleanup. Start work on throws. Fix try expressions. Beginning work on initializer. Some fixes on LLVM types. Moving more target info into C3. Moving alignment into types Introducing a meta type (incomplete). Start work on macros. Splitting '@' from macro name. 2020-03-29 17:39:33 +02:00
Christoffer Lerno
ad404315d6 Fix some bugs, satisfy more compilers. 2020-03-26 16:37:41 +01:00
Christoffer Lerno
b437cb545f Improved defer functionality, handling goto, conditional defers, next, break, continue, fixed bugs with module path detection. Improved switch parsing. Better errors on unknown module. 2020-01-28 23:41:10 +01: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
df4f88dfcc Fixed a lot of while/if/for. ?: now works. 2019-12-13 00:08:07 +01:00
Christoffer Lerno
acf7efded4 Initial work on throws. Cleanup of AST printout (incomplete!). Fixed issues with dead code after return. 2019-11-28 22:24:10 +01:00
Christoffer Lerno
990918b609 LLVM Codegen 2019-11-20 17:09:25 +01:00