You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking at writing docs for the #[inline] attribute, since that's an omission in the docs right now (working to check off the list in #1019 (comment)). I haven't yet been able to think of a good motivating example though. My go-to example is highly domain specific, and the examples in lrgrammar.lalrpop and lalrpop-test are awfully similar to ?, which makes me not like them as a motivating example. Ideally I'd like something like:
Where ConflictingPrefix basically exists to reduce code duplication, but causes a SR conflict as written, which can be fixed by inlining. But ideally I'd like something at least a little real-world-y, without being too domain specific. Any suggestions?
(Bonus points if lalrpop suggests inlining for the produced conflict, which is does not for the above example. Maybe it should though. I haven't dug in to understand the try_classify_inline_example in detail. Based on a skim of the comments, it seems like the above is in scope for something it should be able to suggest inlining on. But that's a separate issue than writing the docs.)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm looking at writing docs for the
#[inline]
attribute, since that's an omission in the docs right now (working to check off the list in #1019 (comment)). I haven't yet been able to think of a good motivating example though. My go-to example is highly domain specific, and the examples in lrgrammar.lalrpop and lalrpop-test are awfully similar to?
, which makes me not like them as a motivating example. Ideally I'd like something like:You have this grammar:
Where ConflictingPrefix basically exists to reduce code duplication, but causes a SR conflict as written, which can be fixed by inlining. But ideally I'd like something at least a little real-world-y, without being too domain specific. Any suggestions?
(Bonus points if lalrpop suggests inlining for the produced conflict, which is does not for the above example. Maybe it should though. I haven't dug in to understand the
try_classify_inline_example
in detail. Based on a skim of the comments, it seems like the above is in scope for something it should be able to suggest inlining on. But that's a separate issue than writing the docs.)Beta Was this translation helpful? Give feedback.
All reactions