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

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

Issue 10001008: Many type fixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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: lib/compiler/implementation/scanner/listener.dart
diff --git a/lib/compiler/implementation/scanner/listener.dart b/lib/compiler/implementation/scanner/listener.dart
index 343bc5156a52e39edaf6b7f0e9caf4d6d76fb668..a0f7aa8b6fb82a0c1d14b26f04dc472823fa8f6b 100644
--- a/lib/compiler/implementation/scanner/listener.dart
+++ b/lib/compiler/implementation/scanner/listener.dart
@@ -624,9 +624,10 @@ class ElementListener extends Listener {
endToken,
modifiers,
enclosingElement);
- for (Link<Node> nodes = variables.nodes; !nodes.isEmpty();
- nodes = nodes.tail) {
- Expression initializedIdentifier = nodes.head;
+ for (Link<Node> variableNodes = variables.nodes;
+ !variableNodes.isEmpty();
+ variableNodes = variableNodes.tail) {
+ Expression initializedIdentifier = variableNodes.head;
Identifier identifier = initializedIdentifier.asIdentifier();
if (identifier === null) {
identifier = initializedIdentifier.asSendSet().selector.asIdentifier();
@@ -688,8 +689,8 @@ class ElementListener extends Listener {
}
void handleModifiers(int count) {
- NodeList nodes = makeNodeList(count, null, null, null);
- pushNode(new Modifiers(nodes));
+ NodeList modifierNodes = makeNodeList(count, null, null, null);
+ pushNode(new Modifiers(modifierNodes));
}
Token expected(String string, Token token) {
@@ -786,15 +787,15 @@ class ElementListener extends Listener {
NodeList makeNodeList(int count, Token beginToken, Token endToken,
String delimiter) {
- Link<Node> nodes = const EmptyLink<Node>();
+ Link<Node> poppedNodes = const EmptyLink<Node>();
for (; count > 0; --count) {
// This effectively reverses the order of nodes so they end up
// in correct (source) order.
- nodes = nodes.prepend(popNode());
+ poppedNodes = poppedNodes.prepend(popNode());
}
SourceString sourceDelimiter =
(delimiter === null) ? null : new SourceString(delimiter);
- return new NodeList(beginToken, nodes, endToken, sourceDelimiter);
+ return new NodeList(beginToken, poppedNodes, endToken, sourceDelimiter);
}
void beginLiteralString(Token token) {
@@ -843,8 +844,8 @@ class ElementListener extends Listener {
if (isLast) {
pushNode(string);
} else {
- NodeList nodes = new NodeList(null, parts, null, null);
- pushNode(new StringInterpolation(string, nodes));
+ NodeList partNodes = new NodeList(null, parts, null, null);
+ pushNode(new StringInterpolation(string, partNodes));
}
}
@@ -965,8 +966,9 @@ class NodeListener extends ElementListener {
pushNode(new ExpressionStatement(popNode(), token));
}
- void handleOnError(Token token, var error) {
- listener.cancel("internal error: '${token.value}': ${error}", token: token);
+ void handleOnError(Token token, var errorInformation) {
+ listener.cancel("internal error: '${token.value}': ${errorInformation}",
+ token: token);
}
Token expectedFunctionBody(Token token) {
@@ -1313,13 +1315,13 @@ class NodeListener extends ElementListener {
}
void endSwitchBlock(int caseCount, Token beginToken, Token endToken) {
- Link<Node> nodes = const EmptyLink<Node>();
+ Link<Node> caseNodes = const EmptyLink<Node>();
while (caseCount > 0) {
SwitchCase switchCase = popNode();
- nodes = nodes.prepend(switchCase);
+ caseNodes = caseNodes.prepend(switchCase);
caseCount--;
}
- pushNode(new NodeList(beginToken, nodes, endToken, null));
+ pushNode(new NodeList(beginToken, caseNodes, endToken, null));
}
void handleSwitchCase(Token labelToken, int expressionCount,

Powered by Google App Engine
This is Rietveld 408576698