Index: pkg/fasta/lib/src/source/stack_listener.dart |
diff --git a/pkg/fasta/lib/src/source/stack_listener.dart b/pkg/fasta/lib/src/source/stack_listener.dart |
index dce8ae19c89ab5b2cc5250755871becedc09a3fc..8676854eac6398b22e6526110f659e028aa60a8d 100644 |
--- a/pkg/fasta/lib/src/source/stack_listener.dart |
+++ b/pkg/fasta/lib/src/source/stack_listener.dart |
@@ -7,10 +7,10 @@ library fasta.stack_listener; |
import 'dart:collection' show |
Queue; |
-import 'package:dart_parser/src/listener.dart' show |
+import 'package:dart_parser/dart_parser.dart' show |
Listener; |
-import 'package:dart_scanner/src/token.dart' show |
+import 'package:dart_scanner/dart_scanner.dart' show |
BeginGroupToken, |
Token; |
@@ -109,18 +109,21 @@ abstract class StackListener extends Listener { |
print(name); |
} |
+ @override |
void logEvent(String name) { |
print(" ${stack.join('\n ')}"); |
internalError("Unhandled event: $name in $runtimeType $uri."); |
} |
+ @override |
void handleIdentifier(Token token) { |
debugEvent("handleIdentifier"); |
push(token.value); |
} |
- void endConstructorInitializer(Token token) { |
- debugEvent("ConstructorInitializer"); |
+ @override |
+ void endInitializer(Token token) { |
+ debugEvent("Initializer"); |
} |
void checkEmpty() { |
@@ -135,60 +138,72 @@ abstract class StackListener extends Listener { |
} |
} |
+ @override |
void endTopLevelDeclaration(Token token) { |
debugEvent("TopLevelDeclaration"); |
checkEmpty(); |
} |
+ @override |
void endCompilationUnit(int count, Token token) { |
debugEvent("CompilationUnit"); |
checkEmpty(); |
} |
+ @override |
void handleNoTypeArguments(Token token) { |
debugEvent("NoTypeArguments"); |
push(NullValue.TypeArguments); |
} |
+ @override |
void handleNoTypeVariables(Token token) { |
debugEvent("NoTypeVariables"); |
push(NullValue.TypeVariables); |
} |
+ @override |
void handleNoType(Token token) { |
debugEvent("NoType"); |
push(NullValue.Type); |
} |
+ @override |
void handleNoFormalParameters(Token token) { |
debugEvent("NoFormalParameters"); |
push(NullValue.FormalParameters); |
} |
+ @override |
void handleNoArguments(Token token) { |
debugEvent("NoArguments"); |
push(NullValue.Arguments); |
} |
+ @override |
void handleNoFunctionBody(Token token) { |
debugEvent("NoFunctionBody"); |
push(NullValue.FunctionBody); |
} |
+ @override |
void handleNoInitializers() { |
debugEvent("NoInitializers"); |
push(NullValue.Initializers); |
} |
+ @override |
void handleParenthesizedExpression(BeginGroupToken token) { |
debugEvent("ParenthesizedExpression"); |
} |
+ @override |
void beginLiteralString(Token token) { |
debugEvent("beginLiteralString"); |
push(token); |
} |
+ @override |
void endLiteralString(int interpolationCount) { |
debugEvent("endLiteralString"); |
if (interpolationCount == 0) { |
@@ -199,15 +214,18 @@ abstract class StackListener extends Listener { |
} |
} |
+ @override |
void handleStringJuxtaposition(int literalCount) { |
debugEvent("StringJuxtaposition"); |
push(popList(literalCount).join("")); |
} |
+ @override |
void endCatchClause(Token token) { |
debugEvent("CatchClause"); |
} |
+ @override |
void error(String message, Token token) { |
inputError(uri, token.charOffset, message); |
} |