Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention "no preceding space" rule for left paren in function declaration and lambda expressions #76

Open
muzimuzhi opened this issue Sep 19, 2023 · 0 comments

Comments

@muzimuzhi
Copy link

Currently this rule is mentioned in

But Pyret will also complain if a space exists before opening parenthesis in

This also seems to suggest, that the grammar rule for ‹args› (line 916 below)

fun-decl: FUN NAME fun-header [BLOCK] COLON doc-string block where-clause END
fun-header: ty-params args return-ann
ty-params:
[LANGLE list-ty-param* NAME RANGLE]
list-ty-param: NAME COMMA
args: LPAREN [list-arg-elt* binding] RPAREN

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

args: (PARENNOSPACE|PARENAFTERBRACE) [binding (COMMA binding)*] RPAREN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant