Skip to content

Commit 3ff761d

Browse files
committed
Added basic support for translation of C# interpolated strings.
1 parent a1f3eb9 commit 3ff761d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Platform.RegularExpressions.Transformer.CSharpToCpp/CSharpToCppTransformer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ public class CSharpToCppTransformer : Transformer
119119
// unchecked
120120
//
121121
(new Regex(@"[\r\n]{2}\s*?unchecked\s*?$"), "", null, 0),
122+
// $"Argument {argumentName} is null."
123+
// ((std::string)"Argument ").append(argumentName).append(" is null.")
124+
(new Regex(@"\$""(?<left>(\\""|[^""\r\n])*){(?<expression>[_a-zA-Z0-9]+)}(?<right>(\\""|[^""\r\n])*)"""), "((std::string)$\"${left}\").append(${expression}).append(\"${right}\")", null, 10),
122125
// $"
123126
// "
124127
(new Regex(@"\$"""), "\"", null, 0),

0 commit comments

Comments
 (0)