diff --git a/naga/src/front/wgsl/parse/lexer.rs b/naga/src/front/wgsl/parse/lexer.rs index 5c6cd321a7..f71eae5c0f 100644 --- a/naga/src/front/wgsl/parse/lexer.rs +++ b/naga/src/front/wgsl/parse/lexer.rs @@ -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, - ) -> 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()