Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | parser: add test for target recursion overflow | Dirkjan Ochtman | 2024-01-11 | 1 | -0/+6 |
| | |||||
* | parser: limit target recursion | Dirkjan Ochtman | 2024-01-11 | 1 | -14/+25 |
| | |||||
* | Allow trailing comma in macro definition and call | Guillaume Gomez | 2023-12-07 | 2 | -2/+2 |
| | |||||
* | Undo an accidental deletion of `#[derive(Debug)]` | max | 2023-12-07 | 1 | -0/+1 |
| | | | | Signed-off-by: max <gmx.sht@gmail.com> | ||||
* | Added testing for reserved variable names | max | 2023-12-07 | 2 | -5/+20 |
| | | | | Signed-off-by: max <gmx.sht@gmail.com> | ||||
* | Allow to pass named arguments to macro calls | Guillaume Gomez | 2023-11-28 | 2 | -6/+75 |
| | |||||
* | Add better support for rust-like number literals (#908) | PizzasBear | 2023-11-22 | 1 | -5/+65 |
| | | | Signed-off-by: max <gmx.sht@gmail.com> | ||||
* | Enhance match to include multiple targets (#911) | PizzasBear | 2023-11-22 | 1 | -0/+13 |
| | | | Signed-off-by: max <gmx.sht@gmail.com> | ||||
* | Derive Clone for Expr and Target | Andrew Dona-Couch | 2023-11-13 | 2 | -2/+2 |
| | |||||
* | Create a type alias for all `IResult` to simplify code reading | Guillaume Gomez | 2023-10-25 | 3 | -108/+90 |
| | |||||
* | Improve error for `elif` keyword | Guillaume Gomez | 2023-10-25 | 1 | -1/+9 |
| | |||||
* | Improve error for invalid name used in `endmacro` | Guillaume Gomez | 2023-10-25 | 1 | -1/+7 |
| | |||||
* | Improve error for invalid name used in `endblock` | Guillaume Gomez | 2023-10-25 | 2 | -2/+30 |
| | |||||
* | Create `ErrorContext` type | Guillaume Gomez | 2023-10-25 | 3 | -95/+183 |
| | |||||
* | Pass `Node` parsing level to expressions | René Kijewski | 2023-09-28 | 2 | -16/+16 |
| | |||||
* | Limit nesting in parser nodes, too | René Kijewski | 2023-09-28 | 2 | -4/+23 |
| | |||||
* | Require Expr::parse() callers to supply Level | Dirkjan Ochtman | 2023-09-28 | 2 | -16/+18 |
| | |||||
* | Move Level into the crate root | Dirkjan Ochtman | 2023-09-28 | 3 | -18/+17 |
| | |||||
* | Yield a parser error when defining a macro named 'super' | Dirkjan Ochtman | 2023-09-28 | 2 | -4/+11 |
| | |||||
* | Limit expression nesting level to avoid stack overflows | Dirkjan Ochtman | 2023-09-28 | 2 | -34/+83 |
| | |||||
* | Use char_indices() to get byte indices for characters | Dirkjan Ochtman | 2023-09-11 | 2 | -1/+8 |
| | |||||
* | Rename some variables | Dirkjan Ochtman | 2023-09-11 | 1 | -7/+7 |
| | |||||
* | 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 | 2 | -5/+4 |
| | |||||
* | parser: `node::Loop` is much bigger than the other variants | René Kijewski | 2023-08-01 | 1 | -2/+2 |
| | |||||
* | parser: move test for completeness | René Kijewski | 2023-08-01 | 1 | -6/+6 |
| | |||||
* | parser: add type for `Node::Comment` | René Kijewski | 2023-08-01 | 2 | -146/+109 |
| | |||||
* | 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 | 3 | -13/+12 |
| | |||||
* | parser: add type for `Node::Extends` | René Kijewski | 2023-08-01 | 2 | -9/+16 |
| | |||||
* | parser: add type for `Node::Include` | René Kijewski | 2023-08-01 | 2 | -14/+28 |
| | |||||
* | parser: rename `Node::Cond` into `If` and add type | René Kijewski | 2023-08-01 | 2 | -35/+49 |
| | |||||
* | parser: add type for `Node::Let` | René Kijewski | 2023-08-01 | 2 | -26/+34 |
| | |||||
* | parser: add type for `Node::Raw` | René Kijewski | 2023-08-01 | 2 | -29/+38 |
| | |||||
* | parser: add type for `Node::Lit` | René Kijewski | 2023-08-01 | 3 | -49/+54 |
| | |||||
* | parser: add type for `Node::BlockDef` | René Kijewski | 2023-08-01 | 2 | -30/+45 |
| | |||||
* | parser: add type for `Node::Match` | René Kijewski | 2023-08-01 | 2 | -36/+54 |
| | |||||
* | parser: add type for `Node::Call` | René Kijewski | 2023-08-01 | 2 | -20/+40 |
| | |||||
* | parser: add type for `Node::Import` | René Kijewski | 2023-08-01 | 2 | -17/+33 |
| | |||||
* | parser: let `Macro` know its name | René Kijewski | 2023-08-01 | 1 | -52/+53 |
| | |||||
* | 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 |