- a Self-Hosting and Educational C Compiler in Rust inspired by shecc
- Learning Rust technique from rustcc
- LLVM IR learned from here
Currently, shecc supports the following features:
- Unary operators (logical negation, bitwise complements, negation)
- Binary operators (basic arithmetic, bitwise operations, comparisons)
- Local variables (assignment, declaration, variable calling, postfix and prefix incrementing)
- If-else branching
- Ternary operator
- While loops, do-while loops, for loops, break, continue
- Function calling and creation
As of now, only supports variables of type int.
- Lexer
- Parser
- llvm IR
Rust and Cargo installed
$ cargo run file.c