Skip to content

Commit d70d6a2

Browse files
committed
Rule for C# inline properties is fixed. Now it works even if the property name contains more than one word.
1 parent de761b1 commit d70d6a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Platform.RegularExpressions.Transformer.CSharpToCpp/CSharpToCppTransformer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public class CSharpToCppTransformer : Transformer
103103
(new Regex(@", \(\) { return ([^;\r\n]+); }"), ", [&]()-> auto { return $1; }", null, 0),
104104
// Count => GetSizeOrZero(Root);
105105
// GetCount() { return GetSizeOrZero(Root); }
106-
(new Regex(@"([A-Z][a-z]+)\s+=>\s+([^;\r\n]+);"), "Get$1() { return $2; }", null, 0),
106+
(new Regex(@"(\W)([A-Z][a-zA-Z]+)\s+=>\s+([^;\r\n]+);"), "$1Get$2() { return $3; }", null, 0),
107107
// Func<TElement> treeCount
108108
// std::function<TElement()> treeCount
109109
(new Regex(@"Func<([a-zA-Z0-9]+)> ([a-zA-Z0-9]+)"), "std::function<$1()> $2", null, 0),

0 commit comments

Comments
 (0)