mirror of
https://github.com/Noratrieb/uwucc.git
synced 2026-01-16 09:35:07 +01:00
funny ints
This commit is contained in:
parent
c519241bd4
commit
8093f87fc3
9 changed files with 825 additions and 58 deletions
|
|
@ -121,20 +121,40 @@ pub enum Stmt {
|
|||
// --- Types and decls and garbage whatever
|
||||
//
|
||||
|
||||
#[derive(Debug, DebugPls)]
|
||||
pub enum IntTySignedness {
|
||||
Signed,
|
||||
Unsigned,
|
||||
}
|
||||
|
||||
impl Default for IntTySignedness {
|
||||
fn default() -> Self {
|
||||
// C defaults to unsigned for integers.
|
||||
Self::Signed
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, DebugPls)]
|
||||
pub enum IntTyKind {
|
||||
Short,
|
||||
Int,
|
||||
Long,
|
||||
LongLong,
|
||||
}
|
||||
|
||||
#[derive(Debug, DebugPls)]
|
||||
pub struct IntTy {
|
||||
pub sign: IntTySignedness,
|
||||
pub kind: IntTyKind,
|
||||
}
|
||||
|
||||
#[derive(Debug, DebugPls)]
|
||||
pub enum TypeSpecifier {
|
||||
Void,
|
||||
Char,
|
||||
SChar,
|
||||
UChar,
|
||||
Short,
|
||||
UShort,
|
||||
Int,
|
||||
UInt,
|
||||
Long,
|
||||
ULong,
|
||||
LongLong,
|
||||
ULongLong,
|
||||
Integer(IntTy),
|
||||
Float,
|
||||
Double,
|
||||
LongDouble,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue