| ▲ | vermilingua 5 hours ago | ||||||||||||||||
Claims to have all the syntax covered, but not a single example of specifying lifetimes or the turbofish, some of the trickiest rust syntax | |||||||||||||||||
| ▲ | kibwen 5 hours ago | parent | next [-] | ||||||||||||||||
If you already have the ability to express the grammar productions in Rust that allow for optionally-specified types (e.g. variable declaration), then you have the ability to express lifetimes and the turbofish (which is just a curious way to call a generic function with a specific type parameter). The only weird thing would be that Lisp uses the apostrophe character for something very different than Rust, but you could just pick any other way to denote lifetimes. | |||||||||||||||||
| |||||||||||||||||
| ▲ | thatxliner 2 hours ago | parent | prev | next [-] | ||||||||||||||||
You can also drop into direct Rust with the (rust "...") macro if I forgot to implement anything | |||||||||||||||||
| ▲ | kccqzy 3 hours ago | parent | prev | next [-] | ||||||||||||||||
The HRTB is probably the trickiest syntax for specifying lifetimes. It looks like `for<'a> F: Fn(&'a (u8, u16)) -> &'a u8`. | |||||||||||||||||
| |||||||||||||||||
| ▲ | andrepd 5 hours ago | parent | prev [-] | ||||||||||||||||
It's a vibecoded parser... | |||||||||||||||||
| |||||||||||||||||