aboutsummaryrefslogtreecommitdiff
Commit message (Expand)AuthorAgeFilesLines
* Update `run.sh2` to not re-make the C compilerMustafa Quraish2022-02-051-7/+6
* [compiler.cup] Add support for function calls!Mustafa Quraish2022-02-054-12/+130
* [compiler.cup] codegen for unary ops, short circuiting &&/||Mustafa Quraish2022-02-052-1/+66
* [compiler.cup] Add codegen for relational + if/conditional supportMustafa Quraish2022-02-052-2/+96
* [compiler.cup] Add support for lexically scoped local variablesMustafa Quraish2022-02-057-20/+177
* Add implementation of self-hosted compiler so farMustafa Quraish2022-02-059-0/+1574
* Remove old test which disallowed initializing globalsMustafa Quraish2022-02-051-8/+0
* Some very minor fixes (look at message)Mustafa Quraish2022-02-052-1/+3
* Allow empty return statements for void functionsMustafa Quraish2022-02-052-4/+15
* Fix label counts during code generation for `||` and `&&`Mustafa Quraish2022-02-051-10/+10
* Add `lseek` and `mmap` syscall infoMustafa Quraish2022-02-052-1/+24
* Allow function declarations without a definitionMustafa Quraish2022-02-053-14/+41
* Handle command-line arguments properly on linuxMustafa Quraish2022-02-051-4/+13
* Add `OS_IS_MACOS` and `OS_IS_LINUX` constants as builtinsMustafa Quraish2022-02-051-0/+8
* Add support for some more binary ops: |, &, ^Mustafa Quraish2022-02-058-18/+98
* Miscellaneous stdlib additionsMustafa Quraish2022-02-051-5/+41
* Add `sizeof(<type>)` operator that can return the size of a type.Mustafa Quraish2022-02-052-0/+9
* Add ability to initialize global variablesMustafa Quraish2022-02-053-4/+14
* Add `void` type and allow void* to be assigned to other ptr typesMustafa Quraish2022-02-055-9/+24
* Allow `builtins.c` to inject constants into program, use for syscallsMustafa Quraish2022-02-057-90/+204
* Update README.mdMustafa Quraish2022-02-041-2/+2
* Add an enum-like-but-not-really structureMustafa Quraish2022-02-042-0/+49
* Some minor bug fixesMustafa Quraish2022-02-042-4/+12
* Minor fixes, rearranging, whitespace trimming. No functional changes.Mustafa Quraish2022-02-044-25/+28
* Don't open/parse a file that's been included more than onceMustafa Quraish2022-02-041-21/+39
* Add support for read-only constant expressionsMustafa Quraish2022-02-044-7/+121
* Add some simple tests for arrays+stringsMustafa Quraish2022-02-031-0/+131
* Add `exit()` syscall builtinMustafa Quraish2022-02-031-0/+3
* Modify implementation of structs to support unionsMustafa Quraish2022-02-034-13/+19
* Add support for basic structsMustafa Quraish2022-02-038-6/+192
* Add automatic type inference for initialized variable declarationsMustafa Quraish2022-02-031-17/+27
* Add pre-increment and pre-decrement operators.Mustafa Quraish2022-02-032-2/+34
* Add an implicit block around a `for` loop, allow statement initMustafa Quraish2022-02-031-12/+27
* Make `make test` exit early if any of the tests failMustafa Quraish2022-02-031-1/+1
* Push `argc` and `argv` to the `main()` functionMustafa Quraish2022-02-032-1/+11
* Add helper to create builtins for syscalls + implement `read()`Mustafa Quraish2022-02-036-75/+126
* Check for integer-like types in type-checking instead of exact onesMustafa Quraish2022-02-031-7/+7
* Remove `putc` intrinsic and replace with `write(fd, buf, size)`Mustafa Quraish2022-02-036-50/+47
* Move builtins to a separate fileMustafa Quraish2022-02-033-28/+54
* Allow implicitly converting between integer-like-typesMustafa Quraish2022-02-034-5/+33
* Move all common utilities to `std/common.cup`Mustafa Quraish2022-02-032-22/+73
* Avoid pointer-arithmetic multiplications if we have `char*`Mustafa Quraish2022-02-031-24/+34
* Add support for `char` type + string/char literalsMustafa Quraish2022-02-028-21/+153
* Remove default initialization to 0 for variable declarationsMustafa Quraish2022-02-023-6/+9
* Handle OP_ASSIGN in `print_ast()`Mustafa Quraish2022-02-021-0/+6
* Add initial support for arrays (also no testing)Mustafa Quraish2022-02-026-10/+95
* Move type-related stuff to a separate fileMustafa Quraish2022-02-025-194/+217
* Fix examples to include return type on main functionMustafa Quraish2022-02-026-6/+6
* Type checking of expressions / functions!Mustafa Quraish2022-02-0211-131/+327
* Use `type*` instead of `type&` to denote a pointer type (for now)Mustafa Quraish2022-02-021-1/+1