[ABNF] Refine the rule for input titles.

Since we only allow four kinds of input section titles, corresponding to the
public/private/constant/const characterization of function inputs, it seems
beneficial to put this into the grammar, where it is easily captured.

Note that the previous version of the rule, which uses `identifier`, is not
quite right, because, for example, `public` is not an identiifer (it is a
keyword). So the rule would have to be modified anyways.
This commit is contained in:
Alessandro Coglio 2022-05-20 21:58:51 -07:00
parent 3c00cf5b5f
commit 09001004d4
2 changed files with 1 additions and 1 deletions

Binary file not shown.

View File

@ -369,7 +369,7 @@ input-expression = literal
input-item = identifier ":" input-type "=" input-expression ";"
input-title = "[" identifier "]"
input-title = "[" ( %s"public" / %s"private" / %s"constant" / %s"const" ) "]"
input-section = input-title *input-item