mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
missing functions for dev backend for glue
This commit is contained in:
parent
e2dac4f022
commit
1e744dca7c
9 changed files with 113 additions and 17 deletions
|
|
@ -103,6 +103,13 @@ macro_rules! impl_to_from_int_width {
|
|||
_ => roc_error_macros::internal_error!("not an integer layout!")
|
||||
}
|
||||
}
|
||||
|
||||
pub fn try_to_int_width(&self) -> Option<IntWidth> {
|
||||
match self {
|
||||
$(&$layout => Some($int_width),)*
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue