mirror of
https://github.com/Noratrieb/uwucc.git
synced 2026-01-16 09:35:07 +01:00
coerce
This commit is contained in:
parent
54226ad499
commit
05c617f6de
8 changed files with 150 additions and 72 deletions
|
|
@ -145,12 +145,12 @@ pub enum Stmt {
|
|||
//
|
||||
|
||||
#[derive(Debug, DebugPls, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub enum IntTySignedness {
|
||||
pub enum IntSign {
|
||||
Signed,
|
||||
Unsigned,
|
||||
}
|
||||
|
||||
impl Default for IntTySignedness {
|
||||
impl Default for IntSign {
|
||||
fn default() -> Self {
|
||||
// C defaults to unsigned for integers.
|
||||
Self::Signed
|
||||
|
|
@ -170,7 +170,7 @@ pub enum IntTyKind {
|
|||
|
||||
#[derive(Debug, DebugPls, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct IntTy {
|
||||
pub sign: IntTySignedness,
|
||||
pub sign: IntSign,
|
||||
pub kind: IntTyKind,
|
||||
}
|
||||
|
||||
|
|
@ -295,7 +295,7 @@ impl DirectDeclarator {
|
|||
}
|
||||
}
|
||||
|
||||
impl IntTySignedness {
|
||||
impl IntSign {
|
||||
pub fn signed(self) -> bool {
|
||||
matches!(self, Self::Signed)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue