Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Unified Diff: pkg/fasta/lib/src/source/scope_listener.dart

Issue 2650803002: Rename events. (Closed)
Patch Set: Address review comments. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/fasta/lib/src/source/outline_builder.dart ('k') | pkg/fasta/lib/src/source/stack_listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/fasta/lib/src/source/scope_listener.dart
diff --git a/pkg/fasta/lib/src/source/scope_listener.dart b/pkg/fasta/lib/src/source/scope_listener.dart
index 814883f4a3421127d0b00d45742e30186e2ed35e..5f0a4facd9fe6c44919fa7dc66161b01a2277090 100644
--- a/pkg/fasta/lib/src/source/scope_listener.dart
+++ b/pkg/fasta/lib/src/source/scope_listener.dart
@@ -52,6 +52,7 @@ abstract class ScopeListener<J> extends UnhandledListener {
scope = newScope ?? scope.createNestedScope();
}
+ @override
void exitLocalScope() {
scope = pop();
assert(scope != null);
@@ -84,43 +85,51 @@ abstract class ScopeListener<J> extends UnhandledListener {
enterContinueTarget();
}
+ @override
void beginFunctionBody(Token begin) {
debugEvent("beginFunctionBody");
enterLocalScope();
}
+ @override
void beginForStatement(Token token) {
debugEvent("beginForStatement");
enterLoop();
enterLocalScope();
}
+ @override
void beginBlock(Token token) {
debugEvent("beginBlock");
enterLocalScope();
}
+ @override
void beginSwitchBlock(Token token) {
debugEvent("beginSwitchBlock");
enterLocalScope();
enterBreakTarget();
}
+ @override
void beginDoWhileStatement(Token token) {
debugEvent("beginDoWhileStatement");
enterLoop();
}
+ @override
void beginWhileStatement(Token token) {
debugEvent("beginWhileStatement");
enterLoop();
}
+ @override
void beginDoWhileStatementBody(Token token) {
debugEvent("beginDoWhileStatementBody");
enterLocalScope();
}
+ @override
void endDoWhileStatementBody(Token token) {
debugEvent("endDoWhileStatementBody");
var body = pop();
@@ -128,11 +137,13 @@ abstract class ScopeListener<J> extends UnhandledListener {
push(body);
}
+ @override
void beginWhileStatementBody(Token token) {
debugEvent("beginWhileStatementBody");
enterLocalScope();
}
+ @override
void endWhileStatementBody(Token token) {
debugEvent("endWhileStatementBody");
var body = pop();
@@ -140,11 +151,13 @@ abstract class ScopeListener<J> extends UnhandledListener {
push(body);
}
+ @override
void beginForStatementBody(Token token) {
debugEvent("beginForStatementBody");
enterLocalScope();
}
+ @override
void endForStatementBody(Token token) {
debugEvent("endForStatementBody");
var body = pop();
@@ -152,11 +165,13 @@ abstract class ScopeListener<J> extends UnhandledListener {
push(body);
}
+ @override
void beginForInBody(Token token) {
debugEvent("beginForInBody");
enterLocalScope();
}
+ @override
void endForInBody(Token token) {
debugEvent("endForInBody");
var body = pop();
@@ -164,11 +179,13 @@ abstract class ScopeListener<J> extends UnhandledListener {
push(body);
}
+ @override
void beginThenStatement(Token token) {
debugEvent("beginThenStatement");
enterLocalScope();
}
+ @override
void endThenStatement(Token token) {
debugEvent("endThenStatement");
var body = pop();
@@ -176,11 +193,13 @@ abstract class ScopeListener<J> extends UnhandledListener {
push(body);
}
+ @override
void beginElseStatement(Token token) {
debugEvent("beginElseStatement");
enterLocalScope();
}
+ @override
void endElseStatement(Token token) {
debugEvent("endElseStatement");
var body = pop();
@@ -188,6 +207,7 @@ abstract class ScopeListener<J> extends UnhandledListener {
push(body);
}
+ @override
void reportErrorHelper(Token token, ErrorKind kind, Map arguments) {
super.reportErrorHelper(token, kind, arguments);
debugEvent("error: ${recoverableErrors.last}");
« no previous file with comments | « pkg/fasta/lib/src/source/outline_builder.dart ('k') | pkg/fasta/lib/src/source/stack_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698