Skip to content

Add more valid suffixes for decimal single, double.. #73

@vllama

Description

@vllama

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions