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

[Dart] Update the Dart parser and tests to cover Dart Super-Initializer Parameters #853

Closed
wants to merge 1 commit into from

Conversation

jwren
Copy link
Contributor

@jwren jwren commented Jan 24, 2022

@@ -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?

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);

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.

@alexander-doroshko alexander-doroshko self-assigned this Jan 25, 2022
@SergeyZh SergeyZh closed this in 95d9e66 Jan 25, 2022
SergeyZh pushed a commit that referenced this pull request Mar 4, 2022
…meters

close #853

(cherry picked from commit 8053388ab977a0c37b5b4c3c41dedbbefc9dbacd)
(cherry picked from commit af6c9cec36dbb87c772696ca7aed78fddef30e5a)

GitOrigin-RevId: e50ed5c6e1fa763ce225377eb04a96b610c92293
SergeyZh pushed a commit that referenced this pull request Mar 4, 2022
…meters

close #853

(cherry picked from commit 8053388ab977a0c37b5b4c3c41dedbbefc9dbacd)
(cherry picked from commit af6c9cec36dbb87c772696ca7aed78fddef30e5a)
(cherry picked from commit e50ed5c6e1fa763ce225377eb04a96b610c92293)

GitOrigin-RevId: 80e012a6e14f160cb624b87eaea66f7529e79c03
SergeyZh pushed a commit that referenced this pull request Mar 4, 2022
…meters

close #853

(cherry picked from commit 8053388ab977a0c37b5b4c3c41dedbbefc9dbacd)

GitOrigin-RevId: af6c9cec36dbb87c772696ca7aed78fddef30e5a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants