I’ve fixed the problem of LLVM Backend. Now it works normally.
Log in to leave a comment
Now we no longer need a semicolon after expressions like for and if!
Log in to leave a comment
The llvm backend is now more robust. More tests will be added in the future to ensure it works well. Now you can use continue and break freely!
Log in to leave a comment
Cara has break & continue now! But I think I need to wrap the creation of a basic block. The current version requires a lot of testing to avoid bugs.
Log in to leave a comment
Now you can pass functions as values! And you don’t need to worry if the compiler compiles the function several times.
Log in to leave a comment
This is a compiler which support multiple files and namespace! You can also compile to other platforms. It’s highly inspired by rustc.
I have added usize and isize, which involves the support of more targets. Now, in theory, you can build cara for more platforms.
Log in to leave a comment
To easily support typed AST, I refactored expressions, which allows analyzer to create a HashMap that stores all the type info.
Log in to leave a comment
After working really hard, I have finally made github actions work. Now we can build releases easily.
Log in to leave a comment
Now we support multiple files! I will refactor parser and analyzer next, then we can introduce procedural macros and a usable LSP!
Log in to leave a comment
Now we can access constants in the same namespaces easily, and further support shall be done tomorrow. Also, another analyzer which checks namespaces should be built.
Log in to leave a comment
After working hard, I have successfully fixed many bugs of the compiler, and we are now able to create functions in a struct, and access them like A::b! We will implement more features such as better namespaces later.
Log in to leave a comment
Cara has structure support now! But I haven’t used a lexer yet, because I don’t want to drop the parser written in peg I have now.
Log in to leave a comment
I have tried and tried, but the parser is still broken. Maybe I should create a lexer tomorrow, which should simplify the work.
Log in to leave a comment
I have finally implemented a good type checker, and I shall start OOP.
Log in to leave a comment
I have implemented expression type checkers. And more checks will be implemented tomorrow.
Log in to leave a comment
The basic structure of analyzer is built, and I will implement a full-featured analyzer in the next few days.
Log in to leave a comment
Now the symbol table is written in a separate crate, so that I don’t need to write so much duplicated code.
Log in to leave a comment
I have added type cast, which allows the followings:
int -> int
ptr -> ptr
int -> ptr
ptr -> int.
More shall be added in the next days of development.
Log in to leave a comment
Broke the ExpVisitor trait, since it’s too long. I think methods in visitor traits shall be classified better, and I will do it tomorrow.
Log in to leave a comment
Added prototypes. This allows cara to extern C functions like printf. Now we can print things freely.
Log in to leave a comment
Add while, loop and for blocks. Currently they requires ;. I would fix that tomorrow.
Log in to leave a comment