This is not a mistake. I used the same EBNF notation as in the Go Spec. The square brackets represent options. That is, the expression inside the brackets can appear 0 or 1 times.
For example, consider the Fo grammar for a type declaration:
TypeDecl = "type" identifier [ TypeParams ] Type .
It is perfectly valid in Fo to have a type declaration without type parameters, so TypeParams is optional here.
I'll admit that I'm not super familiar with the notation and it's possible I made a mistake somewhere. I just don't think this is one.
This is not a mistake. I used the same EBNF notation as in the Go Spec. The square brackets represent options. That is, the expression inside the brackets can appear 0 or 1 times.
For example, consider the Fo grammar for a type declaration:
It is perfectly valid in Fo to have a type declaration without type parameters, so
TypeParams
is optional here.I'll admit that I'm not super familiar with the notation and it's possible I made a mistake somewhere. I just don't think this is one.