Skip to content

Commit

Permalink
reorder macros (avoids doc linking not working)
Browse files Browse the repository at this point in the history
  • Loading branch information
teoxoy committed Oct 19, 2023
1 parent 0472cc3 commit 201c070
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/front/wgsl/lower/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,6 @@ use crate::{Arena, FastHashMap, FastIndexMap, Handle, Span};

mod construction;

/// Resolves the type of a given expression.
///
/// Expects a &mut [`ExpressionContext`] and a [`Handle<Expression>`].
///
/// Returns a &[`TypeResolution`].
///
/// See the documentation of [`resolve_inner!`] for why this macro is necessary.
macro_rules! resolve {
($ctx:ident, $expr:expr) => {{
$ctx.grow_types($expr)?;
&$ctx.typifier()[$expr]
}};
}
pub(super) use resolve;

/// Resolves the inner type of a given expression.
///
/// Expects a &mut [`ExpressionContext`] and a [`Handle<Expression>`].
Expand Down Expand Up @@ -66,6 +51,21 @@ macro_rules! resolve_inner_binary {
}};
}

/// Resolves the type of a given expression.
///
/// Expects a &mut [`ExpressionContext`] and a [`Handle<Expression>`].
///
/// Returns a &[`TypeResolution`].
///
/// See the documentation of [`resolve_inner!`] for why this macro is necessary.
macro_rules! resolve {
($ctx:ident, $expr:expr) => {{
$ctx.grow_types($expr)?;
&$ctx.typifier()[$expr]
}};
}
pub(super) use resolve;

/// State for constructing a `crate::Module`.
pub struct GlobalContext<'source, 'temp, 'out> {
/// The `TranslationUnit`'s expressions arena.
Expand Down

0 comments on commit 201c070

Please sign in to comment.