Skip to content

Commit 2f625e5

Browse files
committed
Added rule for translating null value.
1 parent ab542b0 commit 2f625e5

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
@@ -295,6 +295,9 @@ public class CSharpToCppTransformer : Transformer
295295
// return ref _elements[node];
296296
// return &_elements[node];
297297
(new Regex(@"return ref ([_a-zA-Z0-9]+)\[([_a-zA-Z0-9\*]+)\];"), "return &$1[$2];", null, 0),
298+
// null
299+
// NULL
300+
(new Regex(@"(\W)null(\W)"), "$1NULL$2", null, 0),
298301
// default
299302
// 0
300303
(new Regex(@"(\W)default(\W)"), "${1}0$2", null, 0),

0 commit comments

Comments
 (0)