aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests/matches.rs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use "target()" to parse "when" blockLibravatar René Kijewski2021-07-301-0/+24
| | | | | | | | | | | | `target()` as used in parsing "let" and "if let" implements parsing nested tuples and structs. But it does not implement parsing literals. The functions `match_variant()` and `with_parameters()` as used in parsing "when" blocks do not implement parsing nested structs, but it implements parsing literals. This PR combines `match_variant()` and `with_parameters()` into `target()`, so that all `{%when%}` support nested structs, too.
* Allow omitting "with" keyword in match blocksLibravatar René Kijewski2021-07-301-0/+17
| | | | | | | | | Askama uses the syntax `{% when Variant with (parameters) %}` in `{% match %}` blocks. This is done because Askama does not implement the whole pattern matching of Rust's `match` statements. This PR wants to bring Askama a step closer Rust's matching, so the "with" keyword should not be needed anymore.
* Fixed whitespace issue when generating match (#399)Libravatar Christian Vallentin2020-12-121-11/+11
| | | | | | | | | | | | | * Fixed #397 * Updated parser to ignore whitespace between match and when * Updated test cases * Updated Python script to generate match ws tests * Added match ws tests * Resolved rustfmt lint
* Support char literalsLibravatar Tuomas Siipola2020-01-031-0/+15
|
* Clean up clippy warningsLibravatar Dirkjan Ochtman2020-01-021-0/+2
|
* Allow using brackets for enums in `match`Libravatar mcarton2018-12-121-2/+6
|
* Use 2018 edition idiomsLibravatar Dirkjan Ochtman2018-12-081-2/+0
|
* Remove unused macro_use attributesLibravatar Dirkjan Ochtman2018-12-081-1/+0
|
* Fix formatting with cargo fmtLibravatar Dirkjan Ochtman2018-06-211-2/+3
|
* Handle a lack of whitespace after match block (fixes #76)Libravatar Dirkjan Ochtman2018-04-121-0/+12
|
* Apply suggestions from rustfmt to improve styleLibravatar Dirkjan Ochtman2017-11-211-1/+1
|
* Support matching custom enumsLibravatar Anthony Nowell2017-11-021-0/+19
|
* Make match ref/deref as neededLibravatar Anthony Nowell2017-11-021-0/+27
| | | | | Much of this can be yanked out and made simpler when match-modes lands in stable
* support literals in match armsLibravatar Anthony Nowell2017-11-021-6/+26
|
* implement basic match functionalityLibravatar Anthony Nowell2017-11-021-0/+18