summaryrefslogtreecommitdiffstats
path: root/crates/rebel-parse
AgeCommit message (Collapse)Author
3 daysrebel-parse, rebel-lang: allow creating none valuesMatthias Schiffer
5 daysrebel-parse, rebel-lang: allow naming option typesMatthias Schiffer
11 daysrebel-parse, rebel-lang: a unit should be an empty tupleMatthias Schiffer
The empty tuple becomes the representation of the unit. An empty struct is still another way to construct a unit, but never stored as a struct.
11 daysrebel-lang: implement function typechecking and evaluationMatthias Schiffer
Upvalues are not supported yet.
11 daysrebel-parse: token: add fn keywordMatthias Schiffer
12 daysrebel-parse: ast: use derive-into-owned crate to derive into_owned() and ↵Matthias Schiffer
borrowed() methods
12 daysrebel-parse: replace &str with Cow<str> in astMatthias Schiffer
Allow creating owned copies of the AST.
14 daysrebel-parse: add support for struct definition shorthand syntaxMatthias Schiffer
14 daysrebel-parse, rebel-lang: remove struct keyword againMatthias Schiffer
In addition, the order of match rules is adjusted to check structs before blocks for improved performance in common cases - structs are likely more frequent than block expressions in most code, and the struct rule can be rejected quickly.
14 daysrebel-parse: make fetch bodies struct-like rather than block-likeMatthias Schiffer
Fetch statements can't have parameters, so we don't need a code block where a simple data structure would suffice.
14 daysrebel-parse, rebel-lang: switch to use ':' for fields in struct literalsMatthias Schiffer
Match Rust and make struct literals and block expressions easily distinguishable even without a struct keyword.
14 daysrebel-parse, rebel-lang: allow specifying explicit map typesMatthias Schiffer
2024-05-05rebel-parse: grammar: check rules in the same order for types and expressionsMatthias Schiffer
2024-05-05rebel-parse, rebel-lang: add support for map literalsMatthias Schiffer
2024-05-04rebel-parse, rebel-lang: switch to rustc-hashMatthias Schiffer
2024-05-04rebel-parse, rebel-lang: implement if-else expressionsMatthias Schiffer
2024-05-04rebel-parse: token: add for, if and else keywordsMatthias Schiffer
2024-05-04rebel-parse, rebel-lang: add support for block expressionsMatthias Schiffer
Our scopes are now actually nested and track bindings lexically.
2024-05-04rebel-parse, rebel-lang: use struct keyword for struct types and literalsMatthias Schiffer
2024-05-01rebel-lang: reuse assignment code for let statementsMatthias Schiffer
This should ensure that let with expression is always equivalent to let + separate initialization.
2024-05-01rebel-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.
2024-05-01rebel-parse: store number literals as i64 instead of u64Matthias Schiffer
Avoid a useless conversion during eval.
2024-05-01rebel-parse, rebel-lang: rename base "expr"/"pat" fields to "base" in ↵Matthias Schiffer
index/field projection
2024-05-01rebel-parse: implement pattern validationMatthias Schiffer
2024-05-01rebel-parse: handle more pattern typesMatthias Schiffer
Add support for parsing parentheses, field access and index operations in patterns, and distinguish let and destructuring pattern.
2024-05-01rebel-parse: add type and pat modes to parse-stringMatthias Schiffer
2024-05-01rebel-parse: add support for different path rootsMatthias Schiffer
Distinguish relative (unprefixed), absolute (`::` prefix) and section-specific (`recipe::`, `task::`) paths.
2024-05-01rebel-parse: sort keyword enum variants by nameMatthias Schiffer
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-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-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-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-parse: use phf for faster keyword parsingMatthias Schiffer
2024-04-28rebel-parse: reserve struct, map and set keywordsMatthias Schiffer
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-parse: implement validation for statementsMatthias Schiffer
2024-04-28rebel-parse: ast: add post-parse validationMatthias Schiffer
2024-04-28rebel-parse: allow expression and empty statementsMatthias Schiffer
2024-04-28rebel-parse: tokenize: use positive list of allowed characters for punctuationMatthias Schiffer
Speed up tokenization, and fixes treating incomplete strings' quotes as punctiation.
2024-04-27Update dependenciesMatthias Schiffer