Age | Commit message (Collapse) | Author | |
---|---|---|---|
2024-04-30 | rebel-parse, rebel-lang: remove array length from types | Matthias Schiffer | |
Tuples are sufficient for fixed-length data. For arrays, the small increase in type safety is not worth the large increase in complexity - both for the typechecker, and the usage of the language. The Coerce parameter of unify() is preserved for now, as it may become useful again for other types like sets. | |||
2024-04-29 | rebel-lang: merge ast_stmt_type() into record_type() and execute() | Matthias Schiffer | |
This deduplicates some code and improves type checking. | |||
2024-04-29 | rebel-lang: repl: use record_type() on a cloned Context instead of ↵ | Matthias Schiffer | |
ast_stmt_type() The whole typechecking will happen in record_type() to avoid duplicating the logic. | |||
2024-04-29 | examples: update recipe example to use let syntax | Matthias Schiffer | |
2024-04-29 | rebel-lang: typing: do not accept _ in expressions | Matthias Schiffer | |
_ is a pattern, not an expression. | |||
2024-04-29 | rebel-parse, rebel-lang: distinguish let statements and simple assignments | Matthias Schiffer | |
2024-04-29 | rebel-parse, rebel-lang: rename "body" to "block" | Matthias Schiffer | |
2024-04-29 | rebel-parse: recipe: actually store fetch block in AST | Matthias Schiffer | |
2024-04-29 | rebel-lang: typing: implement turning an AST Type into a runtime Type | Matthias Schiffer | |
2024-04-29 | rebel-lang: scope: add type namespace | Matthias Schiffer | |
Create a type namespace that is separate from the value namespace, and initialize it with the basic types that should be in scope by default. | |||
2024-04-29 | rebel-parse: ast: typ: allow to distinguish between free and dynamic array ↵ | Matthias Schiffer | |
length | |||
2024-04-29 | rebel-parse: limit explicit array length specification to u32 | Matthias Schiffer | |
2024-04-29 | rebel-lang: limit array lengths to u32 | Matthias Schiffer | |
Make the supported maximum array length independent of usize. | |||
2024-04-29 | rebel-parse: token: reserve "let" and "mut" keywords | Matthias Schiffer | |
2024-04-29 | rebel-parse: replace TypedExpr with TypedPat | Matthias Schiffer | |
2024-04-29 | rebel-parse: create separate types to represent types | Matthias Schiffer | |
2024-04-28 | rebel-parse: rename struct field name from key to name | Matthias Schiffer | |
2024-04-28 | rebel-parse: split expr out of ast module | Matthias Schiffer | |
2024-04-28 | rebel-lang: typing: change function names for expr types | Matthias Schiffer | |
Be explicit about that these functions handle types of AST expressions, rather than an explicit type specification. | |||
2024-04-28 | rebel-lang: distinguish explicit and inferred type of variables | Matthias Schiffer | |
2024-04-28 | rebel-lang: add support str comparision | Matthias Schiffer | |
2024-04-28 | rebel-parse: use phf for faster keyword parsing | Matthias Schiffer | |
2024-04-28 | rebel-parse: reserve struct, map and set keywords | Matthias Schiffer | |
2024-04-28 | rebel-lang: typing: use write_str() to format constant strings | Matthias Schiffer | |
2024-04-28 | rebel-lang: value: fix Value enum variant names to match Type variants | Matthias Schiffer | |
2024-04-28 | rebel-lang: typing: remove unused Coerce::None | Matthias Schiffer | |
2024-04-28 | rebel-lang: typing: rename Coerce::Dynamic to Compare | Matthias Schiffer | |
Compare conveys what this Coercion mode is used for more accurately. | |||
2024-04-28 | rebel-lang: typing: Fix function call type checking to use Coerce::Assign | Matthias Schiffer | |
Apply the same rules to call parameters that are used for variable assignment. | |||
2024-04-28 | rebel-parse: grammar: order combined assignment operations | Matthias Schiffer | |
Test for more frequent operations earlier. | |||
2024-04-28 | rebel-parse: box expressions in statements | Matthias Schiffer | |
The size of the statement type has a noticeable effect on performance. | |||
2024-04-28 | rebel-parse, rebel-lang: rename Map types to Struct | Matthias Schiffer | |
As fields can have different types, calling this a struct is more appropriate, and it frees up the Map name for actual maps that support dynamic lookup and iteration. | |||
2024-04-28 | rebel-parse: add support for swapped-add-assign operator (`=+`) | Matthias Schiffer | |
2024-04-28 | rebel-lang: implement array subtraction | Matthias Schiffer | |
2024-04-28 | rebel-lang: add validation and typechecking benchmark | Matthias Schiffer | |
2024-04-28 | rebel-lang: scope: add Context::record_type() | Matthias Schiffer | |
Add a function for incrementally typechecking a list of statements, without actually evaluating it. | |||
2024-04-28 | rebel-lang: typing: fix Type::ast_stmt_type() parameter name | Matthias Schiffer | |
2024-04-28 | rebel-lang: repl: skip output for all Unit values, not just empty statements | Matthias Schiffer | |
2024-04-28 | rebel-lang: scope: make Module generic again | Matthias Schiffer | |
Even with the merged Contexts, we will need separate value and type namespaces. | |||
2024-04-28 | rebel-lang: scope: rename Context::run() to execute() | Matthias Schiffer | |
2024-04-28 | rebel-lang: repl: skip evaluation of empty statements | Matthias Schiffer | |
2024-04-28 | rebel-lang: typing: add support for typechecking body statements | Matthias Schiffer | |
2024-04-28 | rebel-parse: implement validation for statements | Matthias Schiffer | |
2024-04-28 | rebel-lang: repl: switch from rustyline to reedline | Matthias Schiffer | |
reedline has a nicer API than rustyline. | |||
2024-04-28 | rebel-parse: ast: add post-parse validation | Matthias Schiffer | |
2024-04-28 | rebel-lang: repl: add support for multiline input | Matthias Schiffer | |
Only multiline strings are supported, as the validator only checks if the token stream is valid, not if it is a valid expression. | |||
2024-04-28 | rebel-lang: context: typecheck interpolated expressions | Matthias Schiffer | |
2024-04-28 | rebel-lang: implement simple assignments for REPL | Matthias Schiffer | |
2024-04-28 | rebel-parse: allow expression and empty statements | Matthias Schiffer | |
2024-04-28 | rebel-lang: add type checking to REPL | Matthias Schiffer | |
2024-04-28 | rebel-lang: merge typing and evaluation Context structs | Matthias Schiffer | |
Avoid having to convert between different context types for typechecking and evaluation. During typechecking, upvalues etc. are represented as None values. |