Christoffer Lerno
2e3bbf119c
Lexer cleanup
2020-03-29 17:40:03 +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
ae683d2811
Removed explicit targets from make file.
2020-03-27 09:32:02 +01:00
Christoffer Lerno
7687d53b5a
Merge pull request #19 from jamestmartin/patch-1
...
Added AVR components to LLVM_LINK_COMPONENTS to fix the build on Linux.
2020-03-27 00:32:55 +01:00
James Martin
a6235d2cc4
Added AVR components to LLVM_LINK_COMPONENTS to fix the build on Linux.
...
`-Werror` must still be removed from `target_compile_options` to build with GCC.
Presumably the build would work without any further modifications with Clang, but I have not tested it.
2020-03-26 15:42:48 -07:00
Christoffer Lerno
5c0c0ecd2e
Removed erronous include.
2020-03-26 22:54:57 +01:00
Christoffer Lerno
ad404315d6
Fix some bugs, satisfy more compilers.
2020-03-26 16:37:41 +01:00
Christoffer Lerno
540aea2104
Merge pull request #18 from c3lang/develop
...
Improved defer functionality, handling goto, conditional defers, next…
2020-01-28 23:42:31 +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
641c8b7b76
Changing license to LGPL
2019-12-29 02:56:42 +01:00
Christoffer Lerno
ae1bfeb737
Removed old license.
2019-12-29 02:30:19 +01:00
Christoffer Lerno
95581ffc6c
Updated readme
2019-12-13 00:50:41 +01:00
Christoffer Lerno
df4f88dfcc
Fixed a lot of while/if/for. ?: now works.
2019-12-13 00:08:07 +01:00
Christoffer Lerno
0492683ca0
Added +%, -% and *%
2019-12-12 02:01:16 +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
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
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
74c456a935
Added function block.
2019-11-08 09:13:48 +01:00
Christoffer Lerno
fb4ba385d0
Updated readme.
2019-10-05 17:47:05 +02:00
Christoffer Lerno
a3b90b9500
Removed non-null references.
2019-09-30 13:29:41 +02:00
Christoffer Lerno
5f00d4c2bc
More parsing, start working on packages.
2019-09-16 12:34:23 +02:00
Christoffer Lerno
f6c07d86d0
CT for now parses properly.
2019-09-13 00:38:52 +02:00
Christoffer Lerno
b7c64a46ea
Fixed som additional parsing.
2019-09-12 19:43:05 +02:00
Christoffer Lerno
fcd883e038
Updated readme.
2019-09-12 10:58:54 +02:00
Christoffer Lerno
e04213d420
Some limited calls now working correctly.
2019-09-11 23:20:37 +02:00
Christoffer Lerno
000d1fea4a
Global declarations. Starting work on struct initializers, lots of arithmetics now checked correctly. Support 2cc 4cc 8cc
2019-09-08 21:32:08 +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
33770b905d
Added decorator keyword and reordered types
2019-08-02 14:42:22 +02:00
Christoffer Lerno
634b0b26a2
Some updates to the readme.
2019-08-01 16:16:35 +02:00
Christoffer Lerno
1c3ebdbcf2
Just corrected the URL to the docs.
2019-07-31 23:33:56 +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
Christoffer Lerno
a9c0d2505c
A little more cleanup.
2019-07-25 19:24:53 +02:00
Christoffer Lerno
219f76f896
Cleanup.
2019-07-25 19:20:08 +02:00
Christoffer Lerno
7439dccc53
Add a little testing and keyword parsing x2
2019-07-25 18:57:35 +02:00
Christoffer Lerno
e229d19b7c
Updated the command line parsing a little bit, as well as the README.
2019-07-24 14:24:07 +02:00
Christoffer Lerno
bd7c743e93
Updated project structure. Updated README.
2019-07-15 16:38:31 +02:00
Christoffer Lerno
88b2dc547e
Project setup
2019-07-13 22:46:39 +02:00
Christoffer Lerno
1d02585c7a
Initial commit
2019-07-12 19:07:09 +02:00
Christoffer Lerno
9f057b5c3d
Initial commit
2019-07-12 19:01:41 +02:00