} }
-void CYTypeError::Output(CYOutput &out) const {
- out << "@error";
-}
+void CYTypeCharacter::Output(CYOutput &out) const {
+ switch (signing_) {
+ case CYTypeNeutral: break;
+ case CYTypeSigned: out << "signed" << ' '; break;
+ case CYTypeUnsigned: out << "unsigned" << ' '; break;
+ }
-void CYTypeLong::Output(CYOutput &out) const {
- out << "long" << specifier_;
+ out << "char";
}
-void CYTypeShort::Output(CYOutput &out) const {
- out << "short" << specifier_;
+void CYTypeError::Output(CYOutput &out) const {
+ out << "@error";
}
-void CYTypeSigned::Output(CYOutput &out) const {
- out << "signed" << specifier_;
+void CYTypeIntegral::Output(CYOutput &out) const {
+ if (signing_ == CYTypeUnsigned)
+ out << "unsigned" << ' ';
+ switch (length_) {
+ case 0: out << "short"; break;
+ case 1: out << "int"; break;
+ case 2: out << "long"; break;
+ case 3: out << "long" << ' ' << "long"; break;
+ default: _assert(false);
+ }
}
void CYTypeStruct::Output(CYOutput &out) const {
out << *tail_;
}
-void CYTypeUnsigned::Output(CYOutput &out) const {
- out << "unsigned" << specifier_;
-}
-
void CYTypeReference::Output(CYOutput &out) const {
out << "struct" << ' ' << *name_;
}