From 77fe86e9d9c77eb69c4bfbdd8ef80fddeea77066 Mon Sep 17 00:00:00 2001 From: Konstantin Diachenko Date: Sat, 29 Feb 2020 21:20:27 +0300 Subject: [PATCH] Version 0.2.12. Rule placement fix. --- .../CSharpToCppTransformer.cs | 6 +++--- ...atform.RegularExpressions.Transformer.CSharpToCpp.csproj | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/csharp/Platform.RegularExpressions.Transformer.CSharpToCpp/CSharpToCppTransformer.cs b/csharp/Platform.RegularExpressions.Transformer.CSharpToCpp/CSharpToCppTransformer.cs index af583ed..63b5359 100644 --- a/csharp/Platform.RegularExpressions.Transformer.CSharpToCpp/CSharpToCppTransformer.cs +++ b/csharp/Platform.RegularExpressions.Transformer.CSharpToCpp/CSharpToCppTransformer.cs @@ -286,12 +286,12 @@ public class CSharpToCppTransformer : TextTransformer // $"Argument {argumentName} is null." // ((std::string)"Argument ").append(argumentName).append(" is null.").data() (new Regex(@"\$""(?(\\""|[^""\r\n])*){(?[_a-zA-Z0-9]+)}(?(\\""|[^""\r\n])*)"""), "((std::string)$\"${left}\").append(${expression}).append(\"${right}\").data()", 10), - // ((std::string)((std::string)"[").append(Minimum).append(", ").data()).append(Maximum).append("]").data() - // ((std::string)"[").append(Minimum).append(", ").append(Maximum).append("]").data() - (new Regex(@"\(\(std::string\)(?\(\(std::string\)""(\\""|[^""])*""\)(\.append\([^)\n]+\))+)\.data\(\)\)\.append"), "${begin}.append", 10), // $" // " (new Regex(@"\$"""), "\"", 0), + // ((std::string)((std::string)"[").append(Minimum).append(", ").data()).append(Maximum).append("]").data() + // ((std::string)"[").append(Minimum).append(", ").append(Maximum).append("]").data() + (new Regex(@"\(\(std::string\)(?\(\(std::string\)""(\\""|[^""])*""\)(\.append\([^)\n]+\))+)\.data\(\)\)\.append"), "${begin}.append", 10), // Console.WriteLine("...") // printf("...\n") (new Regex(@"Console\.WriteLine\(""([^""\r\n]+)""\)"), "printf(\"$1\\n\")", 0), diff --git a/csharp/Platform.RegularExpressions.Transformer.CSharpToCpp/Platform.RegularExpressions.Transformer.CSharpToCpp.csproj b/csharp/Platform.RegularExpressions.Transformer.CSharpToCpp/Platform.RegularExpressions.Transformer.CSharpToCpp.csproj index c3d55b2..9fa3595 100644 --- a/csharp/Platform.RegularExpressions.Transformer.CSharpToCpp/Platform.RegularExpressions.Transformer.CSharpToCpp.csproj +++ b/csharp/Platform.RegularExpressions.Transformer.CSharpToCpp/Platform.RegularExpressions.Transformer.CSharpToCpp.csproj @@ -4,7 +4,7 @@ LinksPlatform's Platform.RegularExpressions.Transformer.CSharpToCpp Class Library Konstantin Diachenko Platform.RegularExpressions.Transformer.CSharpToCpp - 0.2.11 + 0.2.12 Konstantin Diachenko net472;netstandard2.0;netstandard2.1 Platform.RegularExpressions.Transformer.CSharpToCpp @@ -24,7 +24,7 @@ true snupkg latest - Added a rule for string format simplification. + Rule placement fix.