Less confusing branches #1

Open
able wants to merge 10 commits from something into master
2 changed files with 21 additions and 9 deletions
Showing only changes of commit 673b2508f4 - Show all commits

16
Cargo.lock generated
View file

@ -76,9 +76,9 @@ dependencies = [
[[package]]
name = "libc"
version = "0.2.147"
version = "0.2.148"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b"
[[package]]
name = "logos"
@ -120,9 +120,9 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d"
[[package]]
name = "proc-macro2"
version = "1.0.66"
version = "1.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328"
dependencies = [
"unicode-ident",
]
@ -176,9 +176,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.29"
version = "2.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a"
checksum = "9caece70c63bfba29ec2fed841a09851b14a235c60010fa4de58089b6c025668"
dependencies = [
"proc-macro2",
"quote",
@ -187,9 +187,9 @@ dependencies = [
[[package]]
name = "unicode-ident"
version = "1.0.11"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c"
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "version_check"

View file

@ -126,7 +126,19 @@ where
});
*/
let unary = path;
let unary = path.foldl_with_state(
just([Token::Dot, Token::Star])
.to(UnaryOperator::Star)
.or(just(Token::Tilde).to(UnaryOperator::Tilde))
.map_with_span(Spanned::new)
.repeated(),
|expr, op, state| {
Spanned::new(
Expr::Unary(op, state.arena.alloc(expr)),
merge_spans(expr.span, op.span),
)
},
);
// <exprL> OP <exprR>
let binary = unary.clone().foldl_with_state(