X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/0da459fc3a86dc9ca5592dda75cea37ec73272b6..b900e1a43acf792e7eaccff2418919d02382cd3c:/Output.cpp diff --git a/Output.cpp b/Output.cpp index d45a739..9ec05c2 100644 --- a/Output.cpp +++ b/Output.cpp @@ -147,7 +147,9 @@ void CYBlock::Output(CYOutput &out, CYFlags flags) const { } void CYBoolean::Output(CYOutput &out, CYFlags flags) const { - out << (Value() ? "true" : "false"); + out << '!' << (Value() ? "0" : "1"); + if ((flags & CYNoInteger) != 0) + out << '.'; } void CYBreak::Output(CYOutput &out, CYFlags flags) const { @@ -181,13 +183,6 @@ void Catch::Output(CYOutput &out) const { } } -void CYComment::Output(CYOutput &out, CYFlags flags) const { - out << '\r'; - out(value_); - out.right_ = true; - out << '\r'; -} - void CYCompound::Output(CYOutput &out, CYFlags flags) const { if (next_ == NULL) expression_->Output(out, flags); @@ -508,6 +503,10 @@ void CYStatement::Output(CYOutput &out) const { Multiple(out); } +void CYTemplate::Output(CYOutput &out, CYFlags flags) const { + _assert(false); +} + void CYTypeArrayOf::Output(CYOutput &out, CYIdentifier *identifier) const { next_->Output(out, Precedence(), identifier); out << '['; @@ -608,7 +607,7 @@ void New::Output(CYOutput &out, CYFlags flags) const { } } void CYNull::Output(CYOutput &out, CYFlags flags) const { - CYWord::Output(out); + out << "null"; } void CYNumber::Output(CYOutput &out, CYFlags flags) const { @@ -651,7 +650,7 @@ void CYPrefix::Output(CYOutput &out, CYFlags flags) const { rhs_->Output(out, Precedence(), CYRight(flags)); } -void CYProgram::Output(CYOutput &out) const { +void CYScript::Output(CYOutput &out) const { out << code_; } @@ -782,7 +781,7 @@ void CYSwitch::Output(CYOutput &out, CYFlags flags) const { } void CYThis::Output(CYOutput &out, CYFlags flags) const { - CYWord::Output(out); + out << "this"; } namespace cy {