Fixed some bugs and added parsing

This commit is contained in:
2023-06-16 15:48:33 -07:00
parent 2964aa4a95
commit e6350d99e9
17 changed files with 157 additions and 42 deletions

View File

@ -12,6 +12,13 @@ namespace Dawn {
};
static inline std::string stringParser(std::string v, std::string *error) {
// Replace slashes and quotes
v = stringReplaceAll(v, "\\", "\\\\\\");
v = stringReplaceAll(v, "\"", "\\\"");
// Newlines.
v = stringReplaceAll(v, "\n", "\\n");
return "\"" + v + "\"";
};