-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Dart] Update the Dart parser and tests to cover Dart Super-Initializer Parameters #853
Conversation
@@ -382,7 +382,7 @@ formalParameterList ::= '(' ')' | | |||
'(' optionalFormalParameters ')' | |||
private normalFormalParameters ::= normalFormalParameter (',' normalFormalParameter)* | |||
|
|||
fieldFormalParameter ::= metadata* finalConstVarVoidOrType? 'this' '.' referenceExpression typeParameters? formalParameterList? | |||
fieldFormalParameter ::= metadata* finalConstVarVoidOrType? ('this' | 'super') '.' referenceExpression typeParameters? formalParameterList? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want to rename the production to fieldOrSuperFormalParameter
, but it doesn't change the semantics, so up to you.
class ConstructorSyntax2 extends SuperClass { | ||
ConstructorSyntax2(this.x, super.y, [super.z]) : super(a, b); | ||
ConstructorSyntax2.c(this.x, super.y, [super.z]) : super(a, b); | ||
ConstructorSyntax2.d(this.x, super.y, {super.z}) : super(a, b); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might want at least one example with more complete syntax.
…meters close #853 (cherry picked from commit 8053388ab977a0c37b5b4c3c41dedbbefc9dbacd) (cherry picked from commit af6c9cec36dbb87c772696ca7aed78fddef30e5a) GitOrigin-RevId: e50ed5c6e1fa763ce225377eb04a96b610c92293
…meters close #853 (cherry picked from commit 8053388ab977a0c37b5b4c3c41dedbbefc9dbacd) (cherry picked from commit af6c9cec36dbb87c772696ca7aed78fddef30e5a) (cherry picked from commit e50ed5c6e1fa763ce225377eb04a96b610c92293) GitOrigin-RevId: 80e012a6e14f160cb624b87eaea66f7529e79c03
…meters close #853 (cherry picked from commit 8053388ab977a0c37b5b4c3c41dedbbefc9dbacd) GitOrigin-RevId: af6c9cec36dbb87c772696ca7aed78fddef30e5a
dart-lang/sdk#48074
https://github.com/dart-lang/language/blob/master/working/1855%20-%20super%20parameters/proposal.md
@alexander-doroshko
@scheglov
@bwilkerson