Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Rename some variables | Dirkjan Ochtman | 2023-09-11 | 1 | -7/+7 |
| | |||||
* | build(deps): update mendes requirement from 0.3.0 to 0.5.0 | dependabot[bot] | 2023-09-08 | 1 | -1/+1 |
| | | | | | | | | | | | | Updates the requirements on [mendes](https://github.com/djc/mendes) to permit the latest version. - [Commits](https://github.com/djc/mendes/commits) --- updated-dependencies: - dependency-name: mendes dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> | ||||
* | Explicitly set resolver at the workspace level | Dirkjan Ochtman | 2023-08-25 | 1 | -0/+1 |
| | |||||
* | escape: simplify literals as suggested by clippy | Dirkjan Ochtman | 2023-08-25 | 1 | -4/+4 |
| | |||||
* | Add section in book about using constants in templates | Guillaume Gomez | 2023-08-09 | 1 | -0/+22 |
| | |||||
* | Optimize parsing boolean literals, too | René Kijewski | 2023-08-03 | 1 | -9/+5 |
| | |||||
* | Parse paths and identifiers only once | René Kijewski | 2023-08-03 | 3 | -37/+53 |
| | | | | | | | | | | | | | | In the old implementation each variable in an expression would be parsed up to three times: * Try to parse a path because it contains a leading double colon, or infix double colons. * Try to parse it as path again by scanning for an identifier that contains an upper case character. * Fall back to scanning for any identifier. This PR turns all three steps into one, without the need for backtracking. | ||||
* | parser: fix white space issues in macro parsing | René Kijewski | 2023-08-02 | 1 | -2/+2 |
| | |||||
* | parser: allow negative numbers in patterns | René Kijewski | 2023-08-02 | 1 | -1/+5 |
| | |||||
* | parser: don't truncates whitespaces after arrays | René Kijewski | 2023-08-02 | 1 | -1/+1 |
| | |||||
* | parser: better error message for unknown nodes | René Kijewski | 2023-08-02 | 2 | -9/+8 |
| | |||||
* | parser: import `parser::{Expr, Node}` | René Kijewski | 2023-08-01 | 4 | -9/+8 |
| | |||||
* | parser: `node::Loop` is much bigger than the other variants | René Kijewski | 2023-08-01 | 2 | -10/+6 |
| | |||||
* | parser: move test for completeness | René Kijewski | 2023-08-01 | 1 | -6/+6 |
| | |||||
* | parser: add type for `Node::Comment` | René Kijewski | 2023-08-01 | 3 | -151/+114 |
| | |||||
* | parser: add `expr::Loop::parse()` | René Kijewski | 2023-08-01 | 1 | -68/+70 |
| | |||||
* | parser: remove re-exports `parser::{node,expr}::*` | René Kijewski | 2023-08-01 | 6 | -18/+22 |
| | |||||
* | parser: add type for `Node::Extends` | René Kijewski | 2023-08-01 | 4 | -12/+19 |
| | |||||
* | parser: add type for `Node::Include` | René Kijewski | 2023-08-01 | 3 | -22/+35 |
| | |||||
* | parser: rename `Node::Cond` into `If` and add type | René Kijewski | 2023-08-01 | 4 | -45/+58 |
| | |||||
* | parser: add type for `Node::Let` | René Kijewski | 2023-08-01 | 3 | -57/+53 |
| | |||||
* | parser: add type for `Node::Raw` | René Kijewski | 2023-08-01 | 3 | -33/+42 |
| | |||||
* | parser: add type for `Node::Lit` | René Kijewski | 2023-08-01 | 4 | -55/+61 |
| | |||||
* | parser: add type for `Node::BlockDef` | René Kijewski | 2023-08-01 | 4 | -64/+58 |
| | |||||
* | parser: add type for `Node::Match` | René Kijewski | 2023-08-01 | 4 | -45/+67 |
| | |||||
* | parser: add type for `Node::Call` | René Kijewski | 2023-08-01 | 3 | -27/+50 |
| | |||||
* | parser: add type for `Node::Import` | René Kijewski | 2023-08-01 | 4 | -25/+41 |
| | |||||
* | parser: let `Macro` know its name | René Kijewski | 2023-08-01 | 3 | -56/+57 |
| | |||||
* | parser: add `Ast::nodes()` method | René Kijewski | 2023-08-01 | 1 | -0/+4 |
| | |||||
* | parser: impement `PartialEq` for `Ast` | René Kijewski | 2023-08-01 | 1 | -0/+7 |
| | |||||
* | parser: implement `Debug` for `Parsed` | René Kijewski | 2023-08-01 | 1 | -1/+9 |
| | |||||
* | parser: use `?` | René Kijewski | 2023-08-01 | 1 | -5/+1 |
| | |||||
* | parser: ensure correct drop order for `Parsed` | René Kijewski | 2023-08-01 | 1 | -2/+3 |
| | | | | | | | | | | | | | | | According to [RFC 1857] the fields of a struct are dropped in the same order as they are declared. For `struct S { a: A, b: B }` field `a` is dropped before field `b`. Our struct `Parsed` is self referencial. Its field `ast` depends on `source`, so `source` must outlife `ast`. This PR changes the order of the fields to reflect this requirement. In practice it should not matter, because we know that the variant of `Node` won't access the string data during their `Drop`, but better safe than sorry - maybe `Node` changes in the future. [RFC 1857]: https://rust-lang.github.io/rfcs/1857-stabilize-drop-order.html | ||||
* | parser: remove panicking `From<&str> for Whitespace` | René Kijewski | 2023-08-01 | 1 | -12/+5 |
| | |||||
* | Fix parsing arrays | René Kijewski | 2023-07-31 | 4 | -12/+93 |
| | | | | | | | | | | | | | | | | This change * allows using empty arrays `[]` in expessions, * adds a cut when the leading `[` was encountered, and * fixes the interaction between arrays and boolean OR. IMO the restriction that you couldn't use empty arrays is not needed. The missing cut made error messages slictly worse if you forget to add the closing `]`. Filter expressions must not have white spaces before the pipe `|`. The white space is used to tell a filter expressions, and `std::ops::Or` apart. | ||||
* | Fix parsing calls | René Kijewski | 2023-07-31 | 3 | -6/+33 |
| | | | | | | | This change: * adds a cut when the leading `(` was encountered, and * fixed the interaction between call expressions and boolean OR. | ||||
* | CI: make sure parser is tested | René Kijewski | 2023-07-31 | 1 | -3/+3 |
| | |||||
* | parser: rename block to nodes | Dirkjan Ochtman | 2023-07-31 | 3 | -18/+21 |
| | |||||
* | parser: reorder items in node module | Dirkjan Ochtman | 2023-07-31 | 1 | -50/+50 |
| | |||||
* | parser: move Expr parser helpers into callers | Dirkjan Ochtman | 2023-07-31 | 1 | -53/+54 |
| | |||||
* | parser: move single expr parsers into Expr impl | Dirkjan Ochtman | 2023-07-31 | 1 | -63/+63 |
| | |||||
* | parser: move binary operator parsers into Expr impl | Dirkjan Ochtman | 2023-07-31 | 1 | -71/+71 |
| | |||||
* | parser: flatten top-level Expr interface | Dirkjan Ochtman | 2023-07-31 | 2 | -36/+28 |
| | |||||
* | parser: move suffix parsers into impl block | Dirkjan Ochtman | 2023-07-31 | 1 | -53/+61 |
| | |||||
* | parser: move cond parsers into type impls | Dirkjan Ochtman | 2023-07-31 | 1 | -39/+43 |
| | |||||
* | parser: move parser helpers into callers | Dirkjan Ochtman | 2023-07-31 | 1 | -35/+35 |
| | |||||
* | parser: move when parsers into impl block | Dirkjan Ochtman | 2023-07-31 | 1 | -47/+50 |
| | |||||
* | parser: define a struct for Match | Dirkjan Ochtman | 2023-07-31 | 3 | -9/+27 |
| | |||||
* | parser: define a struct for Cond | Dirkjan Ochtman | 2023-07-31 | 3 | -9/+25 |
| | |||||
* | parser: move node parsers into impl block | Dirkjan Ochtman | 2023-07-31 | 2 | -410/+406 |
| |