ast::Int::to_usize

This commit is contained in:
Jeong YunWon 2023-05-10 21:31:02 +09:00
parent 822cac5aa0
commit d6b6df5d1c

View file

@ -46,6 +46,9 @@ impl Int {
pub fn to_u32(&self) -> u32 {
self.0
}
pub fn to_usize(&self) -> usize {
self.0 as _
}
pub fn to_bool(&self) -> bool {
self.0 > 0
}