summaryrefslogtreecommitdiffstats
path: root/crates
AgeCommit message (Collapse)Author
2 hoursrebel-lang: scope: minor code cleanupmainMatthias Schiffer
3 hoursrebel-lang: scope: add helpers for Var accessMatthias Schiffer
3 hoursrebel-lang: add execute benchmarkMatthias Schiffer
3 hoursrebel-lang: scope: store initialization status separately from valueMatthias Schiffer
By storing a Value instead of an Option<Value>, we can just pass around a &mut Value instead of a ValueSlot. The initialized flag can also be used for typechecking, when no Value is available.
5 hoursrebel-lang: reuse assignment code for let statementsMatthias Schiffer
This should ensure that let with expression is always equivalent to let + separate initialization.
6 hoursrebel-lang: scope: allow assigning to _ patternsMatthias Schiffer
6 hoursrebel-lang: scope: factor out assign_destr_pat_type() and ↵Matthias Schiffer
assign_destr_pat_value() helpers
7 hoursrebel-lang: scope: allow assigning to tuple fieldsMatthias Schiffer
7 hoursUpdate dependenciesMatthias Schiffer
8 hoursrebel-parse: recipe: allow negative integer literalsMatthias Schiffer
Parsing a number as a negative literal instead of a positive number with negation fixes parsing of i64::MIN. The rule is only used for this specific case though, as the unary_op + number rule will succeed first otherwise.
8 hoursrebel-lang: add more detailed error informationMatthias Schiffer
The different error types for lookup, type and eval are unified.
8 hoursrebel-parse: store number literals as i64 instead of u64Matthias Schiffer
Avoid a useless conversion during eval.
9 hoursrebel-lang: scope: check index type in array index patternsMatthias Schiffer
9 hoursrebel-parse, rebel-lang: rename base "expr"/"pat" fields to "base" in ↵Matthias Schiffer
index/field projection
10 hoursrebel-lang: scope: allow assigning fields and array elementsMatthias Schiffer
13 hoursscope: introduce LookupError typeMatthias Schiffer
15 hoursrebel-parse: implement pattern validationMatthias Schiffer
15 hoursrebel-parse: handle more pattern typesMatthias Schiffer
Add support for parsing parentheses, field access and index operations in patterns, and distinguish let and destructuring pattern.
25 hoursrebel-parse: add type and pat modes to parse-stringMatthias Schiffer
25 hoursrebel-parse: add support for different path rootsMatthias Schiffer
Distinguish relative (unprefixed), absolute (`::` prefix) and section-specific (`recipe::`, `task::`) paths.
25 hoursrebel-parse: sort keyword enum variants by nameMatthias Schiffer
25 hoursrebel-lang: scope: add helpers for path handlingMatthias Schiffer
2 daysrebel-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.
2 daysrebel-lang: merge ast_stmt_type() into record_type() and execute()Matthias Schiffer
This deduplicates some code and improves type checking.
2 daysrebel-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.
2 daysrebel-lang: typing: do not accept _ in expressionsMatthias Schiffer
_ is a pattern, not an expression.
2 daysrebel-parse, rebel-lang: distinguish let statements and simple assignmentsMatthias Schiffer
2 daysrebel-parse, rebel-lang: rename "body" to "block"Matthias Schiffer
2 daysrebel-parse: recipe: actually store fetch block in ASTMatthias Schiffer
2 daysrebel-lang: typing: implement turning an AST Type into a runtime TypeMatthias Schiffer
2 daysrebel-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.
2 daysrebel-parse: ast: typ: allow to distinguish between free and dynamic array ↵Matthias Schiffer
length
2 daysrebel-parse: limit explicit array length specification to u32Matthias Schiffer
2 daysrebel-lang: limit array lengths to u32Matthias Schiffer
Make the supported maximum array length independent of usize.
2 daysrebel-parse: token: reserve "let" and "mut" keywordsMatthias Schiffer
3 daysrebel-parse: replace TypedExpr with TypedPatMatthias Schiffer
3 daysrebel-parse: create separate types to represent typesMatthias Schiffer
3 daysrebel-parse: rename struct field name from key to nameMatthias Schiffer
3 daysrebel-parse: split expr out of ast moduleMatthias Schiffer
3 daysrebel-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.
3 daysrebel-lang: distinguish explicit and inferred type of variablesMatthias Schiffer
3 daysrebel-lang: add support str comparisionMatthias Schiffer
3 daysrebel-parse: use phf for faster keyword parsingMatthias Schiffer
3 daysrebel-parse: reserve struct, map and set keywordsMatthias Schiffer
3 daysrebel-lang: typing: use write_str() to format constant stringsMatthias Schiffer
3 daysrebel-lang: value: fix Value enum variant names to match Type variantsMatthias Schiffer
3 daysrebel-lang: typing: remove unused Coerce::NoneMatthias Schiffer
3 daysrebel-lang: typing: rename Coerce::Dynamic to CompareMatthias Schiffer
Compare conveys what this Coercion mode is used for more accurately.
3 daysrebel-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.
3 daysrebel-parse: grammar: order combined assignment operationsMatthias Schiffer
Test for more frequent operations earlier.