-
-
Notifications
You must be signed in to change notification settings - Fork 189
Basic implementation of recursive parsers macro #902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
* Make nested_in more flexible * Semver break
|
After having played around with this version a bit, it has the same benefit that the (improved) Neat solution :) Out of curiosity, what is your opinion on removing |
|
I'm glad you like it, your
Hmm, what do you mean by this? My editor doesn't have LSP support, so I don't really understand. My plan is to add some way to include a type hint (like
Very much in favour. I've been of the view for a while that they're a stop-gap, and one that's easy to accidentally misuse. I think deprecation is fine for the time being (leaks aren't ideal, but they're not really an actual problem for the most-part), at least until a 1.0 release finally comes around. |
Ah. I would not survive programming Rust without my LSP, props to you. So, I mean: // With `recursive_n` you effectively have to forward declare the parsers
recursive_n(|(expr, statement)|
let expr = expr_atom(expr.clone(), , sta▍)
})
// With `parsers!` you are encouraged to finish the definition before moving to the next time
parsers! {
expr = expr_atom(expr.clone(), sta▍)
}For this example, we can treat ▍as the cursor position. At this point with I don't think it's really a big problem, but just something I noticed :) |
(The use of
Unpinis arbitrary, I just wanted some dyn-compatible trait that worked for non-'staticlifetimes)