Replies: 3 comments 1 reply
-
If I'm understanding correctly, during your parse you are wanting to turn For myself, I've found byte offsets should exclusively be used, leaving
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply! Exactly true, I don't need line_number until I get an error (either parse error or semantic error). What I want to achieve is similar to https://docs.rs/winnow/latest/winnow/_tutorial/chapter_7/index.html, At that point, essentially I'll compute |
Beta Was this translation helpful? Give feedback.
-
Thank you for suggestion! I'm not using https://github.com/xkikeg/okane/blob/3aac9529e66a72aa27fdc9169041f729c83edde0/core/src/parse.rs#L118 |
Beta Was this translation helpful? Give feedback.
-
Since
Located
holdsinitial
internally, it'll be trivial to give "already consumed slices".Currently I have a implementation to get consumed slices for line number offset by holding both
&str initial
andLocated<&str> input
, but if I can getinput.consumed()
viaLocated
, that'll be easy to use. WDYT?Beta Was this translation helpful? Give feedback.
All reactions