X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fcarfire;a=blobdiff_plain;f=CarFire%2FCarFire%2FCarFire%2FParse.cs;h=ca98353067cf4f55e0ad499aa235082d1e4e32a7;hp=bb2e9c1115d6d10bfdde9ed296a34cb468bd4add;hb=236bc590ff21370c1139a8c01ff35f7b30af743d;hpb=a67a04fbbf048dc08edd2ed726aa8c6da4c26a6b 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) {