@@ -92,12 +92,15 @@ public class CSharpToCppTransformer : Transformer
9292 // private
9393 //
9494 ( new Regex ( @"(\W)(private|protected|public|internal) " ) , "$1" , null , 0 ) ,
95+ // static void NotImplementedException(ThrowExtensionRoot root) => throw new NotImplementedException();
96+ // static void NotImplementedException(ThrowExtensionRoot root) { return throw new NotImplementedException(); }
97+ ( new Regex ( @"(^\s+)(template \<[^>\r\n]+\> )?(static )?(override )?([a-zA-Z0-9]+ )([a-zA-Z0-9]+)\(([^\(\r\n]*)\)\s+=>\s+throw([^;\r\n]+);" ) , "$1$2$3$4$5$6($7) { throw$8; }" , null , 0 ) ,
9598 // SizeBalancedTree(int capacity) => a = b;
9699 // SizeBalancedTree(int capacity) { a = b; }
97- ( new Regex ( @"(^\s+)(override )?(void )?([a-zA-Z0-9]+)\(([^\(\r\n]*)\)\s+=>\s+([^;\r\n]+);" ) , "$1$2$3$4($5 ) { $6 ; }" , null , 0 ) ,
100+ ( new Regex ( @"(^\s+)(template \<[^>\r\n]+\> )?(static )?( override )?(void )?([a-zA-Z0-9]+)\(([^\(\r\n]*)\)\s+=>\s+([^;\r\n]+);" ) , "$1$2$3$4$5$6($7 ) { $8 ; }" , null , 0 ) ,
98101 // int SizeBalancedTree(int capacity) => a;
99102 // int SizeBalancedTree(int capacity) { return a; }
100- ( new Regex ( @"(^\s+)(override )?([a-zA-Z0-9]+ )([a-zA-Z0-9]+)\(([^\(\r\n]*)\)\s+=>\s+([^;\r\n]+);" ) , "$1$2$3$4($5 ) { return $6 ; }" , null , 0 ) ,
103+ ( new Regex ( @"(^\s+)(template \<[^>\r\n]+\> )?(static )?( override )?([a-zA-Z0-9]+ )([a-zA-Z0-9]+)\(([^\(\r\n]*)\)\s+=>\s+([^;\r\n]+);" ) , "$1$2$3$4$5$6($7 ) { return $8 ; }" , null , 0 ) ,
101104 // () => Integer<TElement>.Zero,
102105 // () { return Integer<TElement>.Zero; },
103106 ( new Regex ( @"\(\)\s+=>\s+([^,;\r\n]+?)," ) , "() { return $1; }," , null , 0 ) ,
0 commit comments