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

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: nits 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
« no previous file with comments | « pkg/csslib/lib/parser.dart ('k') | pkg/csslib/lib/src/css_printer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e0ec078e77b7e2eab18b5fcd2a652be6a2e35ca8 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];
@@ -968,8 +967,8 @@ class AllExtends extends Visitor {
* Changes any selector that matches @extend.
*/
class InheritExtends extends Visitor {
- Messages _messages;
- AllExtends _allExtends;
+ final Messages _messages;
+ final AllExtends _allExtends;
InheritExtends(this._messages, this._allExtends);
« no previous file with comments | « pkg/csslib/lib/parser.dart ('k') | pkg/csslib/lib/src/css_printer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698