summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2024-04-30rebel-parse, rebel-lang: remove array length from typesMatthias 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-29rebel-lang: merge ast_stmt_type() into record_type() and execute()Matthias Schiffer
This deduplicates some code and improves type checking.
2024-04-29rebel-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-29examples: update recipe example to use let syntaxMatthias Schiffer
2024-04-29rebel-lang: typing: do not accept _ in expressionsMatthias Schiffer
_ is a pattern, not an expression.
2024-04-29rebel-parse, rebel-lang: distinguish let statements and simple assignmentsMatthias Schiffer
2024-04-29rebel-parse, rebel-lang: rename "body" to "block"Matthias Schiffer
2024-04-29rebel-parse: recipe: actually store fetch block in ASTMatthias Schiffer
2024-04-29rebel-lang: typing: implement turning an AST Type into a runtime TypeMatthias Schiffer
2024-04-29rebel-lang: scope: add type namespaceMatthias 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-29rebel-parse: ast: typ: allow to distinguish between free and dynamic array ↵Matthias Schiffer
length
2024-04-29rebel-parse: limit explicit array length specification to u32Matthias Schiffer
2024-04-29rebel-lang: limit array lengths to u32Matthias Schiffer
Make the supported maximum array length independent of usize.
2024-04-29rebel-parse: token: reserve "let" and "mut" keywordsMatthias Schiffer
2024-04-29rebel-parse: replace TypedExpr with TypedPatMatthias Schiffer
2024-04-29rebel-parse: create separate types to represent typesMatthias Schiffer
2024-04-28rebel-parse: rename struct field name from key to nameMatthias Schiffer
2024-04-28rebel-parse: split expr out of ast moduleMatthias Schiffer
2024-04-28rebel-lang: typing: change function names for expr typesMatthias Schiffer
Be explicit about that these functions handle types of AST expressions, rather than an explicit type specification.
2024-04-28rebel-lang: distinguish explicit and inferred type of variablesMatthias Schiffer
2024-04-28rebel-lang: add support str comparisionMatthias Schiffer
2024-04-28rebel-parse: use phf for faster keyword parsingMatthias Schiffer
2024-04-28rebel-parse: reserve struct, map and set keywordsMatthias Schiffer
2024-04-28rebel-lang: typing: use write_str() to format constant stringsMatthias Schiffer
2024-04-28rebel-lang: value: fix Value enum variant names to match Type variantsMatthias Schiffer
2024-04-28rebel-lang: typing: remove unused Coerce::NoneMatthias Schiffer
2024-04-28rebel-lang: typing: rename Coerce::Dynamic to CompareMatthias Schiffer
Compare conveys what this Coercion mode is used for more accurately.
2024-04-28rebel-lang: typing: Fix function call type checking to use Coerce::AssignMatthias Schiffer
Apply the same rules to call parameters that are used for variable assignment.
2024-04-28rebel-parse: grammar: order combined assignment operationsMatthias Schiffer
Test for more frequent operations earlier.
2024-04-28rebel-parse: box expressions in statementsMatthias Schiffer
The size of the statement type has a noticeable effect on performance.
2024-04-28rebel-parse, rebel-lang: rename Map types to StructMatthias 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-28rebel-parse: add support for swapped-add-assign operator (`=+`)Matthias Schiffer
2024-04-28rebel-lang: implement array subtractionMatthias Schiffer
2024-04-28rebel-lang: add validation and typechecking benchmarkMatthias Schiffer
2024-04-28rebel-lang: scope: add Context::record_type()Matthias Schiffer
Add a function for incrementally typechecking a list of statements, without actually evaluating it.
2024-04-28rebel-lang: typing: fix Type::ast_stmt_type() parameter nameMatthias Schiffer
2024-04-28rebel-lang: repl: skip output for all Unit values, not just empty statementsMatthias Schiffer
2024-04-28rebel-lang: scope: make Module generic againMatthias Schiffer
Even with the merged Contexts, we will need separate value and type namespaces.
2024-04-28rebel-lang: scope: rename Context::run() to execute()Matthias Schiffer
2024-04-28rebel-lang: repl: skip evaluation of empty statementsMatthias Schiffer
2024-04-28rebel-lang: typing: add support for typechecking body statementsMatthias Schiffer
2024-04-28rebel-parse: implement validation for statementsMatthias Schiffer
2024-04-28rebel-lang: repl: switch from rustyline to reedlineMatthias Schiffer
reedline has a nicer API than rustyline.
2024-04-28rebel-parse: ast: add post-parse validationMatthias Schiffer
2024-04-28rebel-lang: repl: add support for multiline inputMatthias 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-28rebel-lang: context: typecheck interpolated expressionsMatthias Schiffer
2024-04-28rebel-lang: implement simple assignments for REPLMatthias Schiffer
2024-04-28rebel-parse: allow expression and empty statementsMatthias Schiffer
2024-04-28rebel-lang: add type checking to REPLMatthias Schiffer
2024-04-28rebel-lang: merge typing and evaluation Context structsMatthias Schiffer
Avoid having to convert between different context types for typechecking and evaluation. During typechecking, upvalues etc. are represented as None values.