remove next_scalar_generic

This commit is contained in:
teoxoy authored and Teodor Tanasoaia committed 2026-01-28 12:00:35 +01:00
1 parent 6bcf0f2d28
commit 21972dd38f
2 files changed
+1 -17

No files matched your search

-16
View File
@@ -519,22 +519,6 @@ impl<'a> Lexer<'a> {
}
}
/// Parses a generic scalar type, for example `<f32>`.
pub(in crate::front::wgsl) fn next_scalar_generic(&mut self) -> Result<'a, Scalar> {
self.expect_generic_paren('<')?;
let (scalar, _span) = match self.next() {
(Token::Word(word), span) => {
conv::get_scalar_type(&self.enable_extensions, span, word)?
.map(|scalar| (scalar, span))
.ok_or(Error::UnknownScalarType(span))?
}
(_, span) => return Err(Box::new(Error::UnknownScalarType(span))),
};
self.expect_generic_paren('>')?;
Ok(scalar)
}
/// Parses a generic scalar type, for example `<f32>`.
///
/// Returns the span covering the inner type, excluding the brackets.
+1 -1
View File
@@ -1784,7 +1784,7 @@ impl Parser {
)?
}
"atomic" => {
let scalar = lexer.next_scalar_generic()?;
let (scalar, _) = lexer.next_scalar_generic_with_span()?;
ast::Type::Atomic(scalar)
}
"ptr" => {