Open muzimuzhi opened 11 months ago
Currently this rule is mentioned in
Note that there is no space allowed before the opening parenthesis of the application. https://pyret.org/docs/latest/Expressions.html#%28part._s~3aapp-expr%29
Spaces are not permitted before the left-angle bracket or after the right-angle bracket https://pyret.org/docs/latest/Expressions.html#%28part._s~3ainst-expr%29
But Pyret will also complain if a space exists before opening parenthesis in
fun f (n): n end
lam (n): n end
This also seems to suggest, that the grammar rule for ‹args› (line 916 below) https://github.com/brownplt/pyret-docs/blob/e54e93331412615b27f8f5b3d54826e70a6f86a7/src/lang/forms.scrbl#L911-L916 should be updated to
args: PARENNOSPACE [list-arg-elt* binding] RPAREN
As a reference, in pyret-grammar.bnf in pyret-lang repo, ‹args› has grammar rule
pyret-grammar.bnf
args: (PARENNOSPACE|PARENAFTERBRACE) [binding (COMMA binding)*] RPAREN
Currently this rule is mentioned in
But Pyret will also complain if a space exists before opening parenthesis in
fun f (n): n end
https://pyret.org/docs/latest/s_declarations.html#%28part._s~3afun-decl%29lam (n): n end
https://pyret.org/docs/latest/Expressions.html#%28part._s~3alam-expr%29This also seems to suggest, that the grammar rule for ‹args› (line 916 below) https://github.com/brownplt/pyret-docs/blob/e54e93331412615b27f8f5b3d54826e70a6f86a7/src/lang/forms.scrbl#L911-L916 should be updated to
As a reference, in
pyret-grammar.bnf
in pyret-lang repo, ‹args› has grammar rule