Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Implement statement parsingHEADmain | Himbeer | 25 hours | 1 | -1/+289 |
| | |||||
* | Fix constant parser not consuming an equals sign | Himbeer | 25 hours | 1 | -0/+4 |
| | |||||
* | Implement type and expression parsing | Himbeer | 25 hours | 1 | -0/+562 |
| | |||||
* | Declare needed parsing function prototypes | Himbeer | 25 hours | 1 | -0/+3 |
| | |||||
* | Prefix bitwise assignment operations with B | Himbeer | 26 hours | 1 | -3/+3 |
| | |||||
* | Remove unnecessary *crement information | Himbeer | 26 hours | 1 | -6/+0 |
| | |||||
* | Remove unnecessary cmp_e rhs indirection | Himbeer | 26 hours | 1 | -2/+1 |
| | | | | The op member already tells us whether rhs holds a meaningful value. | ||||
* | Separate grp_e and sub-accesses | Himbeer | 26 hours | 1 | -2/+2 |
| | |||||
* | Change character literal representation from int to uint32_t | Himbeer | 26 hours | 1 | -1/+1 |
| | |||||
* | Fix syntax of type.c | Himbeer | 26 hours | 1 | -12/+12 |
| | |||||
* | Add lexical token for character literals | Himbeer | 26 hours | 2 | -0/+17 |
| | |||||
* | Move error function to util.c | Himbeer | 26 hours | 4 | -30/+17 |
| | |||||
* | Add tokens for op-assignments and in/decrement | Himbeer | 26 hours | 2 | -8/+53 |
| | |||||
* | Add missing 'as' and 'tagof' tokens | Himbeer | 2 days | 2 | -0/+4 |
| | |||||
* | Implement toplevel parsing | Himbeer | 3 days | 2 | -28/+371 |
| | |||||
* | Add align, enum and pub keywords | Himbeer | 3 days | 2 | -0/+6 |
| | |||||
* | Add missing visibility information to certain toplevels | Himbeer | 3 days | 1 | -0/+4 |
| | |||||
* | Stop supporting `-enclosed string literals | Himbeer | 3 days | 1 | -1/+0 |
| | |||||
* | Simplify type system to primitives only | Himbeer | 3 days | 2 | -124/+34 |
| | |||||
* | Add location fields to AST data structures that need it | Himbeer | 4 days | 2 | -0/+72 |
| | |||||
* | Define overhauled AST data structures | Himbeer | 4 days | 5 | -1764/+260 |
| | |||||
* | Remove mut, import, export, enum | Himbeer | 7 days | 4 | -153/+5 |
| | |||||
* | Remove terminating semicolons | Himbeer | 2024-10-20 | 1 | -7/+7 |
| | |||||
* | Remove import system | Himbeer | 2024-10-20 | 1 | -3/+1 |
| | | | | | | | Imports will be removed until a clean design can be thought of. A workaround is to use export and extern. The final solution is likely going to be an automation of this or a package-oriented system where source code gets imported directly, single-file or multi-file. | ||||
* | Separate types from values | Himbeer | 2024-10-20 | 1 | -2/+4 |
| | | | | | | Types can no longer be stored in constants. A runtime reflection mechanism may be provided in the future, but the language does not aim to implement a compile-time programming environment. | ||||
* | Check for import name collisions | Himbeer | 2024-10-08 | 1 | -1/+22 |
| | |||||
* | Add a check stub | Himbeer | 2024-10-08 | 4 | -0/+54 |
| | |||||
* | Implement expression-based language redesign | Himbeer | 2024-10-07 | 4 | -155/+183 |
| | | | | | This is the implementation of commit ce68792c848caee2f184e7a6392d9f1e958da1a1. | ||||
* | Implement optional break expressions | Himbeer | 2024-10-02 | 2 | -9/+21 |
| | |||||
* | Implement optional return expressions | Himbeer | 2024-10-02 | 2 | -3/+5 |
| | | | | | This is the implementation of commit 7c2cfd1657924a9d66757a627eef9caa117684a9. | ||||
* | Make return expressions optional | Himbeer | 2024-10-01 | 1 | -1/+1 |
| | | | | | | Since it is impossible to construct a value of type void (or even spell its type) this change is needed to enable returning from void functions conditionally. | ||||
* | Make passing labels to break/continue optional | Himbeer | 2024-10-01 | 1 | -2/+2 |
| | | | | | | | The default case is to break out of the innermost block or to continue the innermost loop. Since this is the desired behavior in the majority of cases this change can be beneficial for readability, especially if a value is returned. | ||||
* | Attach (optional) labels to blocks rather than loops | Himbeer | 2024-10-01 | 2 | -4/+4 |
| | | | | | | This makes it possible to return values from any block by breaking out of it, enabling if statements to yield expressions when combined with commit ce68792c848caee2f184e7a6392d9f1e958da1a1. | ||||
* | Fix for loop AST node referencing struct ast_assign under the wrong name | Himbeer | 2024-10-01 | 1 | -2/+1 |
| | |||||
* | Switch to an expression-based language design | Himbeer | 2024-10-01 | 1 | -6/+5 |
| | | | | | | | | The previous approach required both assignment and call statements to be matched last which is impossible. An expression-based language design simplifies the parser and provides useful syntax to programmers (such as a ternary operator in the form of assigning the result of an if statement). This commit does not provide an implementation. | ||||
* | Fix expression matching success being inverted | Himbeer | 2024-10-01 | 1 | -1/+1 |
| | |||||
* | Fix invalid inner types not raising an error | Himbeer | 2024-10-01 | 1 | -3/+15 |
| | |||||
* | Fix unary postfix expressions being expected in absence of operator | Himbeer | 2024-10-01 | 1 | -1/+6 |
| | | | | | | This allows the expression parser to return false for non-expressions instead of terminating the entire parsing procedure with an error, fixing calls to functions with no parameters not being allowed. | ||||
* | Implement statement parsing | Himbeer | 2024-10-01 | 1 | -3/+303 |
| | |||||
* | Add AST data structures for statements | Himbeer | 2024-10-01 | 2 | -3/+106 |
| | |||||
* | Fix literal parsing accepting any non-booleans as strings | Himbeer | 2024-09-26 | 1 | -1/+4 |
| | |||||
* | Fix union tag types not being accepted by the parsing procedure | Himbeer | 2024-09-26 | 1 | -1/+13 |
| | |||||
* | Fix non-matching tokens not being ummatched in type/expression parsing | Himbeer | 2024-09-26 | 1 | -0/+2 |
| | |||||
* | Implement literal (expression) parsing | Himbeer | 2024-09-26 | 2 | -9/+106 |
| | |||||
* | Implement type parsing | Himbeer | 2024-09-26 | 5 | -21/+635 |
| | |||||
* | Implement expression parsing | Himbeer | 2024-09-25 | 2 | -11/+513 |
| | |||||
* | Make equality RHS optional | Himbeer | 2024-09-25 | 1 | -2/+2 |
| | | | | This fixes expressions not involving equality checks being invalid. | ||||
* | Require enum and union tag types to be parenthesized | Himbeer | 2024-09-24 | 1 | -2/+2 |
| | | | | | This should make parsing safer in cases where the tag type is omitted, ensuring that no more than one token needs to be unlex'd. | ||||
* | Implement expressions | Himbeer | 2024-09-23 | 4 | -17/+213 |
| | |||||
* | Remove unnecessary parantheses | Himbeer | 2024-09-23 | 1 | -1/+1 |
| |