[decompiler] Working toward bsp (#717)

* clean up

* before int to float stuff

* before trying to eliminate the separate read and write maps

* partial fix for register issues

* add missing include
This commit is contained in:
water111
2021-07-25 15:30:37 -04:00
committed by GitHub
parent 38c97481e7
commit 2b6684aa5c
76 changed files with 5695 additions and 514 deletions
+26
View File
@@ -304,4 +304,30 @@ bool Arguments::only_contains_named(const std::unordered_set<std::string>& names
return true;
}
namespace {
std::string escape_string(const std::string& in) {
std::string result;
result.reserve(in.size());
for (char c : in) {
if (c == '"') {
result.push_back('\\');
result.push_back('"');
} else {
result.push_back(c);
}
}
return result;
}
} // namespace
std::string StringObject::print() const {
return "\"" + escape_string(data) + "\"";
}
std::string StringObject::inspect() const {
return "[string] \"" + escape_string(data) + "\"\n";
}
} // namespace goos