X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=CarFire%2FCarFire%2FCarFire%2FParse.cs;h=ca98353067cf4f55e0ad499aa235082d1e4e32a7;hb=3c616e65a6ecf3ebe7b494c9e22c96bc53a1a36f;hp=bb2e9c1115d6d10bfdde9ed296a34cb468bd4add;hpb=a67a04fbbf048dc08edd2ed726aa8c6da4c26a6b;p=chaz%2Fcarfire diff --git a/CarFire/CarFire/CarFire/Parse.cs b/CarFire/CarFire/CarFire/Parse.cs index bb2e9c1..ca98353 100644 --- a/CarFire/CarFire/CarFire/Parse.cs +++ b/CarFire/CarFire/CarFire/Parse.cs @@ -126,8 +126,8 @@ namespace CarFire /// /// An enumeration. /// Text. - /// The constant, or default(T) if parsing failed. - public static T Constant(string atom) + /// The constant, or null if parsing failed. + public static T? Constant(string atom) where T : struct { try { @@ -137,7 +137,7 @@ namespace CarFire catch (System.Exception ex) #pragma warning restore 0168 { - return default(T); + return null; } } @@ -181,7 +181,7 @@ namespace CarFire /// Parses a function. /// /// Text. - /// An array two strings containing the function name and + /// An array with two strings containing the function name and /// parameter-list, in that order, or null if parsing failed. public static string[] Function(string atom) {