LinqToQuerystring icon indicating copy to clipboard operation
LinqToQuerystring copied to clipboard

Add more valid suffixes for decimal single, double..

Open vllama opened this issue 7 years ago • 0 comments

Cant't locate the current c# literal documentation at the moment but looking at F# : https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/literals It seems like D, F and M should all be valid as suffixes for the following in your grammar.

DOUBLE	:	('-')? ('0'..'9')+ '.' ('0'..'9')+ 'd'?;
SINGLE	:	('-')? ('0'..'9')+ '.' ('0'..'9')+ 'f';
DECIMAL	:	('-')? ('0'..'9')+ '.' ('0'..'9')+ 'm';

I was running into this : System.InvalidCastException: Specified cast is not valid. doing some basic parsing of a filter on a generic List of Dictionary<string, object>> "[pressure] eq 132323432.453454M" does not work but "[pressure] eq 132323432.453454m" works.

vllama avatar Sep 28 '18 12:09 vllama