Skip to content

Commit

Permalink
remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
Vrixyz committed Jan 10, 2025
1 parent af60a4e commit 9bcaefa
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions naga/src/front/wgsl/parse/lexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,27 +310,6 @@ impl<'a> Lexer<'a> {
}
}
}
pub(in crate::front::wgsl) fn start_byte_offset_and_aggregate_comment_module(
&'a mut self,
comments: &mut Vec<Span>,
) -> usize {
loop {
let start = self.current_byte_offset();
// Eat all trivia because `next` doesn't eat trailing trivia.
let (token, rest) = consume_token(self.input, false);
if let Token::CommentModule(_) = token {
self.input = rest;
let next = self.current_byte_offset();
comments.push(Span::new(start as u32, next as u32));
} else if let Token::Trivia = token {
self.input = rest;
} else if let Token::Comment(_) = token {
self.input = rest;
} else {
return self.current_byte_offset();
}
}
}

pub const fn current_byte_offset(&self) -> usize {
self.source.len() - self.input.len()
Expand Down

0 comments on commit 9bcaefa

Please sign in to comment.