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

Unified Diff: pkg/csslib/lib/src/analyzer.dart

Issue 60983003: pkg/csslib: fixed analysis error, more cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixes Created 7 years, 1 month 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: pkg/csslib/lib/src/analyzer.dart
diff --git a/pkg/csslib/lib/src/analyzer.dart b/pkg/csslib/lib/src/analyzer.dart
index cd0c6fbb3ef5e3ac2d8e890dfaf8251b0c52a658..5d42c314c6ef75d381a30f054716b5548daf3b02 100644
--- a/pkg/csslib/lib/src/analyzer.dart
+++ b/pkg/csslib/lib/src/analyzer.dart
@@ -573,7 +573,7 @@ int _findInclude(List list, var node) {
* parameters.
*/
class CallMixin extends Visitor {
- var mixinDef;
+ final MixinDefinition mixinDef;
List _definedArgs;
Expressions _currExpressions;
int _currIndex = -1;
@@ -595,7 +595,7 @@ class CallMixin extends Visitor {
* Given a mixin's defined arguments return a cloned mixin defintion that has
* replaced all defined arguments with user's supplied VarUsages.
*/
- transform(List<TreeNode> callArgs) {
+ MixinDefinition transform(List<TreeNode> callArgs) {
// TODO(terry): Handle default arguments and varArgs.
// Transform mixin with callArgs.
var index = 0;
@@ -620,7 +620,6 @@ class CallMixin extends Visitor {
}
var expressions = varUsages[varDef.definedName];
- var expressionsLength = expressions.length;
expressions.forEach((k, v) {
for (var usagesIndex in v) {
k.expressions.replaceRange(usagesIndex, usagesIndex + 1, callArg);
@@ -724,7 +723,7 @@ class DeclarationIncludes extends Visitor {
bool _allIncludes(rulesets) =>
rulesets.every((rule) => rule is IncludeDirective || rule is NoOp);
- CallMixin _createCallDeclMixin(mixinDef) {
+ CallMixin _createCallDeclMixin(MixinDefinition mixinDef) {
callMap.putIfAbsent(mixinDef.name, () =>
callMap[mixinDef.name] = new CallMixin(mixinDef, varDefs));
return callMap[mixinDef.name];

Powered by Google App Engine
This is Rietveld 408576698