A BNF grammar that explains all possible parts of the syntax

Hi everyone :wave: A newbie to the ReScript community.

I was wondering if there is something like a BNF grammar (or maybe something else) that shows/explains/details out all possible parts of the syntax.

For example, the if expressions in the ReScript syntax don’t have to be parenthesized but the compiler behind the online playground compiles such parenthesized if expressions just fine (which I believe is because of a version of ReasonML also being supported).

As another example, what comprises an identifier in ReScript ? I couldn’t find it in the docs (might be my serach fu is a bit off though :slight_smile: )

A BNF grammar would help in knowing such details.

Thanks !

Yes … where is it ? I really miss it

In fact you can find it gathering comment in the parser source (search for ::= ):