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

Crash on extra semicolon after a block method body #31078

Closed
scheglov opened this Issue Oct 11, 2017 · 4 comments

Comments

@scheglov
Contributor

scheglov commented Oct 11, 2017

class C {
  foo() {};
}
  @20: Expected a declaration, but got ';'.
  null
  #0      Listener.handleUnrecoverableError (package:front_end/src/fasta/parser/listener.dart:1165:5)
  #1      Parser.reportUnrecoverableErrorWithToken (package:front_end/src/fasta/parser/parser.dart:4763:23)
  #2      Parser.parseMember (package:front_end/src/fasta/parser/parser.dart:2824:14)
  #3      Parser.parseClassBody (package:front_end/src/fasta/parser/parser.dart:2783:15)
  #4      Parser.parseClass (package:front_end/src/fasta/parser/parser.dart:1090:13)
  #5      Parser.parseClassOrNamedMixinApplication (package:front_end/src/fasta/parser/parser.dart:1062:14)
  #6      Parser.parseTopLevelKeywordDeclaration (package:front_end/src/fasta/parser/parser.dart:372:14)
  #7      Parser.parseTopLevelDeclarationImpl (package:front_end/src/fasta/parser/parser.dart:306:14)
  #8      Parser.parseUnit (package:front_end/src/fasta/parser/parser.dart:280:15)
  #9      computeUnlinkedUnit (package:front_end/src/incremental/unlinked_unit.dart:29:10)
  #10     FileState.refresh (package:front_end/src/incremental/file_state.dart:170:23)

@bwilkerson

@peter-ahe-google

This comment has been minimized.

Show comment
Hide comment
@peter-ahe-google

peter-ahe-google Oct 12, 2017

Contributor

This is a problem with DirectiveListener. We plan to replace it with deeper integration with Fasta's outline builder.

Contributor

peter-ahe-google commented Oct 12, 2017

This is a problem with DirectiveListener. We plan to replace it with deeper integration with Fasta's outline builder.

@bwilkerson

This comment has been minimized.

Show comment
Hide comment
@bwilkerson

bwilkerson Dec 1, 2017

Member

It looks to me like a parser recovery issue.

Member

bwilkerson commented Dec 1, 2017

It looks to me like a parser recovery issue.

@bwilkerson

This comment has been minimized.

Show comment
Hide comment
@bwilkerson

bwilkerson Dec 1, 2017

Member

@scheglov This CL fixes the error recovery in the parser and probably fixes this issue: https://dart-review.googlesource.com/c/sdk/+/25460. Could you confirm?

Member

bwilkerson commented Dec 1, 2017

@scheglov This CL fixes the error recovery in the parser and probably fixes this issue: https://dart-review.googlesource.com/c/sdk/+/25460. Could you confirm?

@scheglov

This comment has been minimized.

Show comment
Hide comment
@scheglov

scheglov Dec 1, 2017

Contributor

This is fixed.
Thanks.

Contributor

scheglov commented Dec 1, 2017

This is fixed.
Thanks.

@scheglov scheglov closed this Dec 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment