-
Notifications
You must be signed in to change notification settings - Fork 33
Use more descriptive names for pp / epp #131
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
Comments
Most of the
|
Makes sense (even though I personally wouldn't use such short acronyms in a public API). I was just curious about the motivation behind this. |
Edit: I was mistaken and that was not true as of the time of my writing. |
I might be missing something, but I'm not sure what tuples have to do with this? |
My idea was to implement impl<'a> std::fmt::Display for (&dyn Lexer<StorageT>, &dyn Fn(TIdx<StorageT>) -> Option<&'a str>) {
...
} However, I just figured out that that's also not possible at the moment: struct Foo {}
struct Bar {}
impl std::fmt::Display for (Foo, Bar) {} --> src/main.rs:5:1
|
5 | impl std::fmt::Display for (Foo, Bar) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ impl doesn't use types inside crate
|
= note: the impl does not reference only types defined in this crate
= note: define and implement a trait or new type instead Because tuples are currently not marked |
I did not know that! |
This is just a nit-pick – but I think it would be nice to use more descriptive identifiers for
pp/epp
, e.g.pretty_print
:grmtools/lrpar/src/lib/parser.rs
Lines 617 to 621 in 439201b
Those functions might not be needed at all if you implement
std::fmt::Display
/std::fmt::Debug
, but I haven't looked into this case here in detail yet.The text was updated successfully, but these errors were encountered: