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

Spec: Move <constructorInvocation> into <primary> #1199

Closed
munificent opened this issue Sep 2, 2020 · 1 comment
Closed

Spec: Move <constructorInvocation> into <primary> #1199

munificent opened this issue Sep 2, 2020 · 1 comment

Comments

@munificent
Copy link
Member

As far as I can tell, every place in the spec that uses <primary> has a matching clause that accepts <constructorInvocation>. I believe we can simplify things and have the same grammar by moving <constructorInvocation> into <primary> itself:

postfixExpression ::= assignableExpression postfixOperator
| primary selector*

assignableExpression ::= primary assignableSelectorPart
| super unconditionalAssignableSelector
| identifier

primary ::= thisExpression
| "super" unconditionalAssignableSelector
| functionExpression
| literal
| identifier
| newExpression
| constObjectExpression
| constructorInvocation
| "(" expression ")"
@eernstg
Copy link
Member

eernstg commented Sep 3, 2020

Good catch! Done in #1204 and https://dart-review.googlesource.com/c/sdk/+/161708/.

dart-bot pushed a commit to dart-lang/sdk that referenced this issue Sep 3, 2020
Cf. dart-lang/language#1199.

Change-Id: Idb0422aacfe1ef08dbf1c90eb9c01b91de75cfaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161708
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
@eernstg eernstg closed this as completed Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants