| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Rename `cup` directory to `src` | Mustafa Quraish | 2022-01-30 | 14 | -1781/+0 |
| | | |||||
| * | Functions, yay! | Mustafa Quraish | 2022-01-30 | 5 | -19/+183 |
| | | | | | | | | | | | | | | | | We now support function calls! We don't have support for forward declaring functions right now though, so no mutual recursion is possible. The arguments are passed via the stack instead of through registers (unlike the x86_64 calling convention, I think). We'll probably need some sort of primitives built into the language for syscalls eventually because of this. Return types are also not checked, and right now it's possible to have a function that doesn't return anything even when the caller expects it to, error checking and reporting definitely needs to be improved. | ||||
| * | Make the compiler / scripts work on Linux too (yay!) | Mustafa Quraish | 2022-01-29 | 1 | -0/+12 |
| | | |||||
| * | Add for and while loop support (w/o declarations in `for`) | Mustafa Quraish | 2022-01-29 | 5 | -14/+90 |
| | | | | | | | We can now loop and do stuff, yay! However, we don't yet allow declarations inside the for-loop initializer, since that is a bit more annoying to implement. | ||||
| * | Implement blocks (lexically scoped) and conditionals | Mustafa Quraish | 2022-01-29 | 5 | -35/+197 |
| | | |||||
| * | Add i64{max,min} helper functions | Mustafa Quraish | 2022-01-29 | 2 | -1/+7 |
| | | |||||
| * | Allow uninitialized variable declarations | Mustafa Quraish | 2022-01-29 | 5 | -12/+51 |
| | | |||||
| * | Now supporting local variables! :^) | Mustafa Quraish | 2022-01-29 | 5 | -29/+84 |
| | | |||||
| * | Restore line/col count in Lexer_peek to get correct locations | Mustafa Quraish | 2022-01-29 | 1 | -0/+4 |
| | | |||||
| * | Add separator in `die_location()` | Mustafa Quraish | 2022-01-29 | 1 | -0/+1 |
| | | |||||
| * | Add parsing + storing offsets for locals / move around headers | Mustafa Quraish | 2022-01-29 | 8 | -24/+114 |
| | | |||||
| * | Add relational and logical operators + refactor binop parser | Mustafa Quraish | 2022-01-29 | 3 | -50/+159 |
| | | | | | | | | | | We now support OR and AND with short circuiting! (Yet to be tested since we don't yet have local variables to play with). The binop parser took a bit of an overhaul factoring out the common code so that it's easier to describe the operator precendence relationships without being overly repetitive. | ||||
| * | Add some arithmetic binary operations into lex+parse+generation | Mustafa Quraish | 2022-01-28 | 4 | -19/+181 |
| | | |||||
| * | Corrent incorrect `break` in Lexer | Mustafa Quraish | 2022-01-28 | 1 | -5/+6 |
| | | |||||
| * | Add some basic args parsing so we can test stuff from the CLI | Mustafa Quraish | 2022-01-28 | 1 | -23/+66 |
| | | |||||
| * | Lexer: Support inline comments | Mustafa Quraish | 2022-01-28 | 1 | -1/+10 |
| | | | | | | Inline comments are now supported with `// Comment here`. No block comments (for now) | ||||
| * | Add initial code generation capabilities | Mustafa Quraish | 2022-01-28 | 2 | -0/+91 |
| | | | | | | | Currently we output the assembly to a hard-coded file called `output.nasm`. Until the compiler is more mature this should be OK enough | ||||
| * | Lexer+Parser: Add support for some unary operations | Mustafa Quraish | 2022-01-28 | 6 | -8/+50 |
| | | |||||
| * | Add a parser, dump the AST in main | Mustafa Quraish | 2022-01-28 | 3 | -5/+156 |
| | | | | | | Very, very rudimentary, and can only parse integer literals, but it's a start | ||||
| * | Add AST/type definitions | Mustafa Quraish | 2022-01-28 | 2 | -0/+142 |
| | | | | | | Just the basic building blocks for now, probably need to re-think how these are stored. | ||||
| * | Shorten Lexer method names to next/peek | Mustafa Quraish | 2022-01-28 | 2 | -7/+10 |
| | | |||||
| * | Use custom macro for tokens enum+names | Mustafa Quraish | 2022-01-28 | 2 | -81/+75 |
| | | |||||
| * | Initial commit + start of lexer | Mustafa Quraish | 2022-01-24 | 7 | -0/+425 |