aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Implement statement parsingHEADmainHimbeer25 hours1-1/+289
|
* Fix constant parser not consuming an equals signHimbeer25 hours1-0/+4
|
* Implement type and expression parsingHimbeer25 hours1-0/+562
|
* Declare needed parsing function prototypesHimbeer25 hours1-0/+3
|
* Prefix bitwise assignment operations with BHimbeer26 hours1-3/+3
|
* Remove unnecessary *crement informationHimbeer26 hours1-6/+0
|
* Remove unnecessary cmp_e rhs indirectionHimbeer26 hours1-2/+1
| | | | The op member already tells us whether rhs holds a meaningful value.
* Separate grp_e and sub-accessesHimbeer26 hours1-2/+2
|
* Change character literal representation from int to uint32_tHimbeer26 hours1-1/+1
|
* Fix syntax of type.cHimbeer26 hours1-12/+12
|
* Add lexical token for character literalsHimbeer26 hours2-0/+17
|
* Move error function to util.cHimbeer26 hours4-30/+17
|
* Add tokens for op-assignments and in/decrementHimbeer26 hours2-8/+53
|
* Add missing 'as' and 'tagof' tokensHimbeer2 days2-0/+4
|
* Implement toplevel parsingHimbeer3 days2-28/+371
|
* Add align, enum and pub keywordsHimbeer3 days2-0/+6
|
* Add missing visibility information to certain toplevelsHimbeer3 days1-0/+4
|
* Stop supporting `-enclosed string literalsHimbeer3 days1-1/+0
|
* Simplify type system to primitives onlyHimbeer3 days2-124/+34
|
* Add location fields to AST data structures that need itHimbeer4 days2-0/+72
|
* Define overhauled AST data structuresHimbeer4 days5-1764/+260
|
* Remove mut, import, export, enumHimbeer7 days4-153/+5
|
* Remove terminating semicolonsHimbeer2024-10-201-7/+7
|
* Remove import systemHimbeer2024-10-201-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 valuesHimbeer2024-10-201-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 collisionsHimbeer2024-10-081-1/+22
|
* Add a check stubHimbeer2024-10-084-0/+54
|
* Implement expression-based language redesignHimbeer2024-10-074-155/+183
| | | | | This is the implementation of commit ce68792c848caee2f184e7a6392d9f1e958da1a1.
* Implement optional break expressionsHimbeer2024-10-022-9/+21
|
* Implement optional return expressionsHimbeer2024-10-022-3/+5
| | | | | This is the implementation of commit 7c2cfd1657924a9d66757a627eef9caa117684a9.
* Make return expressions optionalHimbeer2024-10-011-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 optionalHimbeer2024-10-011-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 loopsHimbeer2024-10-012-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 nameHimbeer2024-10-011-2/+1
|
* Switch to an expression-based language designHimbeer2024-10-011-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 invertedHimbeer2024-10-011-1/+1
|
* Fix invalid inner types not raising an errorHimbeer2024-10-011-3/+15
|
* Fix unary postfix expressions being expected in absence of operatorHimbeer2024-10-011-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 parsingHimbeer2024-10-011-3/+303
|
* Add AST data structures for statementsHimbeer2024-10-012-3/+106
|
* Fix literal parsing accepting any non-booleans as stringsHimbeer2024-09-261-1/+4
|
* Fix union tag types not being accepted by the parsing procedureHimbeer2024-09-261-1/+13
|
* Fix non-matching tokens not being ummatched in type/expression parsingHimbeer2024-09-261-0/+2
|
* Implement literal (expression) parsingHimbeer2024-09-262-9/+106
|
* Implement type parsingHimbeer2024-09-265-21/+635
|
* Implement expression parsingHimbeer2024-09-252-11/+513
|
* Make equality RHS optionalHimbeer2024-09-251-2/+2
| | | | This fixes expressions not involving equality checks being invalid.
* Require enum and union tag types to be parenthesizedHimbeer2024-09-241-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 expressionsHimbeer2024-09-234-17/+213
|
* Remove unnecessary paranthesesHimbeer2024-09-231-1/+1
|