Skip to content

Commit

Permalink
fix!: clarify what last_event_end_index indices into and how it's used
Browse files Browse the repository at this point in the history
This is marked as breaking change as the field itself is new in `State`
and could be breaking for some.
  • Loading branch information
Byron committed May 30, 2024
1 parent f66724b commit 6c8297c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ pub struct State<'a> {
pub current_shortcut_text: Option<String>,
/// A list of shortcuts seen so far for later emission
pub shortcuts: Vec<(String, String, String)>,
/// Index of the end of the range corresponding to the last event.
/// Index into the `source` bytes of the end of the range corresponding to the last event.
///
/// It's used to see if the current event didn't capture some bytes because of a
/// skipped-over backslash.
pub last_event_end_index: usize,
}

Expand Down

0 comments on commit 6c8297c

Please sign in to comment.