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

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, 10 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 289c2c821ef91460cdd74a8db0fb89e2e320880b..653aefe87b4b697a41242469b2b035ee0f4f7ab7 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) {
@@ -1252,9 +1252,9 @@ class NodeListener extends ElementListener {
}
void endTopLevelFields(int count, Token beginToken, Token endToken) {
- NodeList variables = makeNodeList(count, null, null, ",");
+ NodeList variables = makeNodeList(count, null, endToken, ",");
Modifiers modifiers = popNode();
- pushNode(new VariableDefinitions(null, modifiers, variables, endToken));
+ pushNode(new VariableDefinitions(null, modifiers, variables));
}
void endTopLevelMethod(Token beginToken, Token getOrSet, Token endToken) {
@@ -1275,7 +1275,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);
@@ -1287,8 +1287,8 @@ 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, new NodeList.singleton(name)));
}
void endFormalParameters(int count, Token beginToken, Token endToken) {
@@ -1507,10 +1507,10 @@ class NodeListener extends ElementListener {
void endVariablesDeclaration(int count, Token endToken) {
// TODO(ahe): Pick one name for this concept, either
// VariablesDeclaration or VariableDefinitions.
- NodeList variables = makeNodeList(count, null, null, ",");
+ NodeList variables = makeNodeList(count, null, endToken, ",");
TypeAnnotation type = popNode();
Modifiers modifiers = popNode();
- pushNode(new VariableDefinitions(type, modifiers, variables, endToken));
+ pushNode(new VariableDefinitions(type, modifiers, variables));
}
void endInitializer(Token assignmentOperator) {
@@ -1617,10 +1617,10 @@ class NodeListener extends ElementListener {
}
void endFields(int count, Token beginToken, Token endToken) {
- NodeList variables = makeNodeList(count, null, null, ",");
+ NodeList variables = makeNodeList(count, null, endToken, ",");
TypeAnnotation type = popNode();
Modifiers modifiers = popNode();
- pushNode(new VariableDefinitions(type, modifiers, variables, endToken));
+ pushNode(new VariableDefinitions(type, modifiers, variables));
}
void endMethod(Token getOrSet, Token beginToken, Token endToken) {

Powered by Google App Engine
This is Rietveld 408576698