case '\t': str << "\\t"; break;
case '\v': str << "\\v"; break;
+ case '\a':
+ if (mode == CYStringifyModeNative)
+ str << "\\a";
+ else goto simple;
+ break;
+
case '\n':
if (!split)
str << "\\n";
break;
case '\0':
- if (value[1] >= '0' && value[1] <= '9')
+ if (mode != CYStringifyModeNative && value[1] >= '0' && value[1] <= '9')
str << "\\x00";
else
str << "\\0";
default:
if (next >= 0x20 && next < 0x7f) simple:
str << *value;
+ else if (mode == CYStringifyModeNative)
+ str << "\\x" << std::setbase(16) << std::setw(2) << std::setfill('0') << unsigned(*value & 0xff);
else {
unsigned levels(1);
if ((next & 0x80) != 0)
rhs_->Output(out, Precedence(), CYRight(flags));
}
+void CYAttemptMember::Output(CYOutput &out, CYFlags flags) const {
+ object_->Output(out, Precedence(), CYLeft(flags) | CYNoInteger);
+ if (const char *word = property_->Word())
+ out << "?." << word;
+ else
+ _assert(false);
+}
+
void CYBlock::Output(CYOutput &out, CYFlags flags) const {
out << '{' << '\n';
++out.indent_;
out << "@error";
}
+void CYTypeFloating::Output(CYOutput &out) const {
+ switch (length_) {
+ case 0: out << "float"; break;
+ case 1: out << "double"; break;
+ case 2: out << "long" << ' ' << "double"; break;
+ default: _assert(false);
+ }
+}
+
void CYTypeInt128::Output(CYOutput &out) const {
switch (signing_) {
case CYTypeNeutral: break;