Skip to content

Commit

Permalink
Version 0.2.12. Rule placement fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Konard committed Feb 29, 2020
1 parent 6215d44 commit 77fe86e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,12 @@ public class CSharpToCppTransformer : TextTransformer
// $"Argument {argumentName} is null."
// ((std::string)"Argument ").append(argumentName).append(" is null.").data()
(new Regex(@"\$""(?<left>(\\""|[^""\r\n])*){(?<expression>[_a-zA-Z0-9]+)}(?<right>(\\""|[^""\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\)(?<begin>\(\(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\)(?<begin>\(\(std::string\)""(\\""|[^""])*""\)(\.append\([^)\n]+\))+)\.data\(\)\)\.append"), "${begin}.append", 10),
// Console.WriteLine("...")
// printf("...\n")
(new Regex(@"Console\.WriteLine\(""([^""\r\n]+)""\)"), "printf(\"$1\\n\")", 0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Description>LinksPlatform's Platform.RegularExpressions.Transformer.CSharpToCpp Class Library</Description>
<Copyright>Konstantin Diachenko</Copyright>
<AssemblyTitle>Platform.RegularExpressions.Transformer.CSharpToCpp</AssemblyTitle>
<VersionPrefix>0.2.11</VersionPrefix>
<VersionPrefix>0.2.12</VersionPrefix>
<Authors>Konstantin Diachenko</Authors>
<TargetFrameworks>net472;netstandard2.0;netstandard2.1</TargetFrameworks>
<AssemblyName>Platform.RegularExpressions.Transformer.CSharpToCpp</AssemblyName>
Expand All @@ -24,7 +24,7 @@
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latest</LangVersion>
<PackageReleaseNotes>Added a rule for string format simplification.</PackageReleaseNotes>
<PackageReleaseNotes>Rule placement fix.</PackageReleaseNotes>
</PropertyGroup>

<ItemGroup Condition="$(TargetFramework.StartsWith('net4')) AND '$(MSBuildRuntimeType)' == 'Core' AND '$(OS)' != 'Windows_NT'">
Expand Down

0 comments on commit 77fe86e

Please sign in to comment.