Skip to content

Commit

Permalink
Patterns parsing: Add logEvent call to Listener.handlePatternVariable…
Browse files Browse the repository at this point in the history
…DeclarationStatement.

Normally, listener methods call `LogEvent`.  This helps find bugs
where a listener that extends `Listener` doesn't implement a necessary
callback.

Bug: #50035
Change-Id: Ideac739d8d63cda2244572f7d1deb83dceeced37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272346
Commit-Queue: Paul Berry <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
  • Loading branch information
stereotype441 authored and Commit Queue committed Nov 28, 2022
1 parent 1d9f3ba commit e69a503
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/_fe_analyzer_shared/lib/src/parser/listener.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2136,5 +2136,7 @@ class Listener implements UnescapeErrorListener {
/// patterns accepted by the `outerPattern` grammar rule defined in the
/// patterns spec.
void handlePatternVariableDeclarationStatement(
Token keyword, Token equals, Token semicolon) {}
Token keyword, Token equals, Token semicolon) {
logEvent('PatternVariableDeclarationStatement');
}
}

0 comments on commit e69a503

Please sign in to comment.