llcc is a (toy) C compiler written in Rust with no dependencies that compiles C code into x86_64 following Intel syntax.
- Binary and unary operators
- Global and local variable declarations
-
char,int,float, &doubletypes - Function calls & recursion
- Pointers
-
putchar - Conditional statements
-
for,whileloops
Features detailed, colorful error messages and can report multiple errors in a program.
| Code | Messages |
|---|---|
void foo() {
return 0;
}
int main() {
int x = 7 / 0;
return 0;
} |
|
Use the --print-ast option to print the AST tree after parsing.
| Code | Tree |
|---|---|
int main() {
int y = 9 * 2;
return 0;
} |
|

