mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-22 22:44:47 +03:00
[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:
parent
3c00cf5b5f
commit
09001004d4
Binary file not shown.
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user