mirror of
https://github.com/Noratrieb/uwucc.git
synced 2026-01-15 09:05:06 +01:00
coerce
This commit is contained in:
parent
54226ad499
commit
05c617f6de
8 changed files with 150 additions and 72 deletions
|
|
@ -4,7 +4,7 @@ use peekmore::PeekMoreIterator;
|
|||
use crate::{
|
||||
ast::{
|
||||
Decl, DeclAttr, DeclSpec, Declarator, DirectDeclarator, ExternalDecl, FunctionDef,
|
||||
FunctionParamDecl, Ident, InitDecl, IntTy, IntTyKind, IntTySignedness, NormalDecl, Stmt,
|
||||
FunctionParamDecl, Ident, InitDecl, IntTy, IntTyKind, IntSign, NormalDecl, Stmt,
|
||||
TranslationUnit, TypeSpecifier,
|
||||
},
|
||||
pre::Punctuator as P,
|
||||
|
|
@ -335,11 +335,11 @@ where
|
|||
self.peek_t()
|
||||
{
|
||||
// the signed is an integer qualifier
|
||||
signedness = Some(IntTySignedness::Signed);
|
||||
signedness = Some(IntSign::Signed);
|
||||
continue;
|
||||
}
|
||||
TypeSpecifier::Integer(IntTy {
|
||||
sign: IntTySignedness::Signed,
|
||||
sign: IntSign::Signed,
|
||||
kind: IntTyKind::Int,
|
||||
})
|
||||
}
|
||||
|
|
@ -354,18 +354,18 @@ where
|
|||
self.peek_t()
|
||||
{
|
||||
// the unsigned is an integer qualifier
|
||||
signedness = Some(IntTySignedness::Unsigned);
|
||||
signedness = Some(IntSign::Unsigned);
|
||||
continue;
|
||||
}
|
||||
TypeSpecifier::Integer(IntTy {
|
||||
sign: IntTySignedness::Unsigned,
|
||||
sign: IntSign::Unsigned,
|
||||
kind: IntTyKind::Int,
|
||||
})
|
||||
}
|
||||
Tok::Kw(Kw::Float) => TypeSpecifier::Float,
|
||||
Tok::Kw(Kw::Double) => TypeSpecifier::Double,
|
||||
Tok::Kw(Kw::Bool) => TypeSpecifier::Integer(IntTy {
|
||||
sign: IntTySignedness::Unsigned,
|
||||
sign: IntSign::Unsigned,
|
||||
kind: IntTyKind::Bool,
|
||||
}),
|
||||
Tok::Kw(Kw::Complex) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue