skip_step_comment

Function skip_step_comment 

Source
pub fn skip_step_comment(bytes: &[u8], i: usize) -> Option<usize>
Expand description

If a STEP /* ... */ comment starts at bytes[i], the index just past its closing */.

Returns None when bytes[i] doesn’t begin a comment, and ALSO when it does but no closing */ exists anywhere in bytes after it — an unterminated comment is refused rather than silently run to end of input. A caller that needs to tell those two None cases apart already knows which one it’s in, from having checked bytes[i..i + 2] == b"/*" itself before calling (as every call site in this repo does), so the single Option return doesn’t lose information.