aboutsummaryrefslogtreecommitdiff
path: root/doc
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 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-011-3/+3
| | | | | | 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.
* 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.
* Add AST data structures for statementsHimbeer2024-10-011-1/+1
|
* 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.
* Remove unnecessary paranthesesHimbeer2024-09-231-1/+1
|
* Merge array and slice grammar definitionsHimbeer2024-09-211-7/+5
| | | | | This makes it possible for the parser to distinguish between them without unlexing more than one token.
* Reorder type variants in grammarHimbeer2024-09-211-3/+5
|
* Remove the 'pub' keywordHimbeer2024-09-211-4/+2
| | | | This significantly simplifies parsing. All constants will be public.
* Make (extern) function return types optionalHimbeer2024-09-201-2/+3
|
* Define syntax for specifying enum tag typesHimbeer2024-09-151-1/+1
|
* Rename block children from body to commandHimbeer2024-09-151-2/+2
| | | | This is a better name since blocks only have one body.
* Fix non-initial import statements being valid according to grammarHimbeer2024-09-151-2/+2
| | | | | Import statements are only allowed at the beginning of a file. No further imports are allowed after the first non-import statement.
* Merge INTEGER and FLOAT tokens into NUMBER tokenHimbeer2024-09-151-4/+5
|
* Accomodate doc comments in grammarHimbeer2024-09-121-2/+5
|
* Make identifiers / paths sequences of names delimited by ::Himbeer2024-09-121-4/+6
| | | | This is much easier to lex than separate token kinds.
* Add boolean value keywordsHimbeer2024-09-121-1/+2
|
* Add missing "for" keyword to loop grammar ruleHimbeer2024-09-121-1/+1
|
* Make number type postfixHimbeer2024-09-121-1/+1
|
* Treat builtin types as keywords during lexical analysisHimbeer2024-09-121-6/+6
|
* Add boolean algebra to the grammarHimbeer2024-09-111-1/+4
|
* Add boolean AND and OR to the grammarHimbeer2024-09-111-1/+4
|
* Add module system to grammarHimbeer2024-09-111-13/+15
|
* Initial commitHimbeer2024-09-111-0/+76