mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 20:51:19 +00:00
New parser event needed to check case expressions.
R=paulberry@google.com Review-Url: https://codereview.chromium.org/2900993002 .
This commit is contained in:
parent
1cfb242321
commit
f5012090f9
|
@ -65,6 +65,12 @@ class Listener {
|
|||
logEvent("Cascade");
|
||||
}
|
||||
|
||||
void beginCaseExpression(Token caseKeyword) {}
|
||||
|
||||
void endCaseExpression(Token colon) {
|
||||
logEvent("CaseExpression");
|
||||
}
|
||||
|
||||
void beginClassBody(Token token) {}
|
||||
|
||||
/// Handle the end of the body of a class declaration. The only substructures
|
||||
|
|
|
@ -3722,7 +3722,9 @@ class Parser {
|
|||
labelCount++;
|
||||
}
|
||||
Token caseKeyword = token;
|
||||
listener.beginCaseExpression(token);
|
||||
token = parseExpression(token.next);
|
||||
listener.endCaseExpression(token);
|
||||
Token colonToken = token;
|
||||
token = expect(':', token);
|
||||
listener.handleCaseMatch(caseKeyword, colonToken);
|
||||
|
|
Loading…
Reference in a new issue