aboutsummaryrefslogtreecommitdiff
path: root/src/parser.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix alignof() usage and a very sneaky bugThomas Voss 2024-06-121-1/+1
| | | | | | | | | | | | | | | | | | It might seem innocuous, but the following expression is actually quite prone to breakage: ast->kids[i].lhs = parseexpr(ast, toks); The reason is that parseexpr() and the other parsing functions return indicies into the AST, however in doing so they may find that the AST needs to grow and call astresz(). Should astresz() be called there is a chance that we will realloc() a new buffer somewhere else in memory, causing the left-hand side of the above expression to now be pointing to an invalid location in memory. To combat this we’re forced to break it up into two statements: idx_t_ lhs = parseexpr(ast, toks); ast->kids[i].lhs = lhs;
* Assert that we don’t have too many tokensThomas Voss 2024-06-111-0/+5
|
* Remove ‘soa’ from lots of identifiersThomas Voss 2024-06-111-2/+2
|
* Be consistent with the *_t_ suffix for typedefsThomas Voss 2024-06-111-3/+3
|
* Switch size_t indicies to be idx_t_Thomas Voss 2024-06-111-3/+5
|
* Add basic LLVM codegenThomas Voss 2024-06-111-23/+35
|
* Parse very basic declarationsThomas Voss 2024-06-111-4/+26
|
* Begin work on a basic parserThomas Voss 2024-06-111-0/+32