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

Unified Diff: sdk/lib/_internal/compiler/implementation/scanner/listener.dart

Issue 11783089: Fix VariableDefinitions.endToken for formal parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 7 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
Index: sdk/lib/_internal/compiler/implementation/scanner/listener.dart
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
index 8f1b67529b608fda54b9c3e51ffc616e7e6b71ca..720067810a22e979487b2bd38478990197dfeaa7 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
@@ -105,7 +105,7 @@ class Listener {
void beginFormalParameter(Token token) {
}
- void endFormalParameter(Token token, Token thisKeyword) {
+ void endFormalParameter(Token thisKeyword) {
}
void handleNoFormalParameters(Token token) {
@@ -1263,7 +1263,7 @@ class NodeListener extends ElementListener {
modifiers, compilationUnitElement));
}
- void endFormalParameter(Token token, Token thisKeyword) {
+ void endFormalParameter(Token thisKeyword) {
Expression name = popNode();
if (thisKeyword != null) {
Identifier thisIdentifier = new Identifier(thisKeyword);
@@ -1275,8 +1275,11 @@ class NodeListener extends ElementListener {
}
TypeAnnotation type = popNode();
Modifiers modifiers = popNode();
- pushNode(new VariableDefinitions(type, modifiers,
- new NodeList.singleton(name), token));
+ pushNode(
+ new VariableDefinitions(type, modifiers,
ahe 2013/01/23 11:26:36 It is beginning to feel like a hack to use Variabl
Johnni Winther 2013/01/28 12:23:24 It feels better after removing the 'null' for endT
+ new NodeList.singleton(name),
+ null // Compute dynamically from the node list.
+ ));
}
void endFormalParameters(int count, Token beginToken, Token endToken) {

Powered by Google App Engine
This is Rietveld 408576698