diff options
author | Caelan Sayler <git@caesay.com> | 2024-02-22 13:33:20 +0000 |
---|---|---|
committer | Piotr Fusik <piotr@fusion-lang.org> | 2024-02-22 14:37:24 +0100 |
commit | b297cb9886b2b37bb10c5835737f1f42d4d9ffb9 (patch) | |
tree | 37b65eb521e40c017bec1a7ac58554f5639b63e1 | |
parent | b02b77f6ed164500754c3f794826bc4a32097253 (diff) |
Fix name of FuString_Replace
-rw-r--r-- | GenCpp.fu | 4 | ||||
-rw-r--r-- | libfut.cpp | 12 | ||||
-rw-r--r-- | libfut.cs | 4 | ||||
-rw-r--r-- | libfut.js | 4 |
4 files changed, 12 insertions, 12 deletions
@@ -809,7 +809,7 @@ public class GenCpp : GenCCpp break; case FuId.StringReplace: this.StringReplace = true; - WriteCall("FuString_replace", obj, args[0], args[1]); + WriteCall("FuString_Replace", obj, args[0], args[1]); break; case FuId.StringStartsWith: WriteStringMethod(obj, "starts_with", method, args); @@ -1983,7 +1983,7 @@ public class GenCpp : GenCCpp WriteLine("using namespace std::string_view_literals;"); if (this.StringReplace) { WriteNewLine(); - WriteLine("static std::string FuString_replace(std::string_view s, std::string_view oldValue, std::string_view newValue)"); + WriteLine("static std::string FuString_Replace(std::string_view s, std::string_view oldValue, std::string_view newValue)"); OpenBlock(); WriteLine("std::string result;"); WriteLine("result.reserve(s.size());"); @@ -6,7 +6,7 @@ #include <format> #include "libfut.hpp" -static std::string FuString_replace(std::string_view s, std::string_view oldValue, std::string_view newValue) +static std::string FuString_Replace(std::string_view s, std::string_view oldValue, std::string_view newValue) { std::string result; result.reserve(s.size()); @@ -2932,7 +2932,7 @@ void FuParser::checkXcrementParent() std::shared_ptr<FuLiteralDouble> FuParser::parseDouble() { double d; - if (![&] { char *ciend; d = std::strtod(FuString_replace(getLexeme(), "_", "").data(), &ciend); return *ciend == '\0'; }()) + if (![&] { char *ciend; d = std::strtod(FuString_Replace(getLexeme(), "_", "").data(), &ciend); return *ciend == '\0'; }()) reportError("Invalid floating-point number"); std::shared_ptr<FuLiteralDouble> result = std::make_shared<FuLiteralDouble>(); result->line = this->line; @@ -2953,7 +2953,7 @@ std::shared_ptr<FuInterpolatedString> FuParser::parseInterpolatedString() std::shared_ptr<FuInterpolatedString> result = std::make_shared<FuInterpolatedString>(); result->line = this->line; do { - std::string prefix{FuString_replace(this->stringValue, "{{", "{")}; + std::string prefix{FuString_Replace(this->stringValue, "{{", "{")}; nextToken(); std::shared_ptr<FuExpr> arg = parseExpr(); std::shared_ptr<FuExpr> width = eat(FuToken::comma) ? parseExpr() : nullptr; @@ -2972,7 +2972,7 @@ std::shared_ptr<FuInterpolatedString> FuParser::parseInterpolatedString() check(FuToken::rightBrace); } while (readString(true) == FuToken::interpolatedString); - result->suffix = FuString_replace(this->stringValue, "{{", "{"); + result->suffix = FuString_Replace(this->stringValue, "{{", "{"); nextToken(); return result; } @@ -13780,7 +13780,7 @@ void GenCpp::writeCallExpr(const FuExpr * obj, const FuMethod * method, const st break; case FuId::stringReplace: this->stringReplace = true; - writeCall("FuString_replace", obj, (*args)[0].get(), (*args)[1].get()); + writeCall("FuString_Replace", obj, (*args)[0].get(), (*args)[1].get()); break; case FuId::stringStartsWith: writeStringMethod(obj, "starts_with", method, args); @@ -14936,7 +14936,7 @@ void GenCpp::writeProgram(const FuProgram * program) writeLine("using namespace std::string_view_literals;"); if (this->stringReplace) { writeNewLine(); - writeLine("static std::string FuString_replace(std::string_view s, std::string_view oldValue, std::string_view newValue)"); + writeLine("static std::string FuString_Replace(std::string_view s, std::string_view oldValue, std::string_view newValue)"); openBlock(); writeLine("std::string result;"); writeLine("result.reserve(s.size());"); @@ -14130,7 +14130,7 @@ namespace Fusion break; case FuId.StringReplace: this.StringReplace = true; - WriteCall("FuString_replace", obj, args[0], args[1]); + WriteCall("FuString_Replace", obj, args[0], args[1]); break; case FuId.StringStartsWith: WriteStringMethod(obj, "starts_with", method, args); @@ -15286,7 +15286,7 @@ namespace Fusion WriteLine("using namespace std::string_view_literals;"); if (this.StringReplace) { WriteNewLine(); - WriteLine("static std::string FuString_replace(std::string_view s, std::string_view oldValue, std::string_view newValue)"); + WriteLine("static std::string FuString_Replace(std::string_view s, std::string_view oldValue, std::string_view newValue)"); OpenBlock(); WriteLine("std::string result;"); WriteLine("result.reserve(s.size());"); @@ -14562,7 +14562,7 @@ export class GenCpp extends GenCCpp break; case FuId.STRING_REPLACE: this.#stringReplace = true; - this.writeCall("FuString_replace", obj, args[0], args[1]); + this.writeCall("FuString_Replace", obj, args[0], args[1]); break; case FuId.STRING_STARTS_WITH: this.#writeStringMethod(obj, "starts_with", method, args); @@ -15733,7 +15733,7 @@ export class GenCpp extends GenCCpp this.writeLine("using namespace std::string_view_literals;"); if (this.#stringReplace) { this.writeNewLine(); - this.writeLine("static std::string FuString_replace(std::string_view s, std::string_view oldValue, std::string_view newValue)"); + this.writeLine("static std::string FuString_Replace(std::string_view s, std::string_view oldValue, std::string_view newValue)"); this.openBlock(); this.writeLine("std::string result;"); this.writeLine("result.reserve(s.size());"); |