From 2aa90a60a45566ebfdb5252a77bb318810cffe0c Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Thu, 7 Jul 2022 18:16:23 +0200 Subject: Fix some small to dos --- src/util/skip.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/util') diff --git a/src/util/skip.rs b/src/util/skip.rs index 2c4198a..a8e4cfe 100644 --- a/src/util/skip.rs +++ b/src/util/skip.rs @@ -1,16 +1,18 @@ +//! Utilities to deal with lists of events. + use crate::tokenizer::{Event, TokenType}; -/// To do. +/// Skip from `index`, optionally past `token_types`. pub fn opt(events: &[Event], index: usize, token_types: &[TokenType]) -> usize { skip_opt_with_direction(events, index, token_types, true) } -/// To do. +/// Skip from `index`, optionally past `token_types`, backwards. pub fn opt_back(events: &[Event], index: usize, token_types: &[TokenType]) -> usize { skip_opt_with_direction(events, index, token_types, false) } -/// To do. +/// Skip internals. fn skip_opt_with_direction( events: &[Event], index: usize, -- cgit