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

Side by Side Diff: lib/src/polyfill.dart

Issue 1832993003: Fix all strong mode errors and warnings. (Closed) Base URL: https://github.com/dart-lang/csslib.git@master
Patch Set: Move type. Created 4 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 unified diff | Download patch
« no previous file with comments | « lib/src/analyzer.dart ('k') | lib/src/property.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of csslib.parser; 5 part of csslib.parser;
6 6
7 /** 7 /**
8 * CSS polyfill emits CSS to be understood by older parsers that which do not 8 * CSS polyfill emits CSS to be understood by older parsers that which do not
9 * understand (var, calc, etc.). 9 * understand (var, calc, etc.).
10 */ 10 */
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 _messages.warning("Variable is not defined.", node.span); 163 _messages.warning("Variable is not defined.", node.span);
164 } 164 }
165 165
166 var oldExpressions = currentExpressions; 166 var oldExpressions = currentExpressions;
167 currentExpressions = node.defaultValues; 167 currentExpressions = node.defaultValues;
168 super.visitVarUsage(node); 168 super.visitVarUsage(node);
169 currentExpressions = oldExpressions; 169 currentExpressions = oldExpressions;
170 } 170 }
171 171
172 List<Expression> resolveUsageTerminal(VarUsage usage) { 172 List<Expression> resolveUsageTerminal(VarUsage usage) {
173 var result = []; 173 var result = <Expression>[];
174 174
175 var varDef = _knownVarDefs[usage.name]; 175 var varDef = _knownVarDefs[usage.name];
176 var expressions; 176 var expressions;
177 if (varDef == null) { 177 if (varDef == null) {
178 // VarDefinition not found try the defaultValues. 178 // VarDefinition not found try the defaultValues.
179 expressions = usage.defaultValues; 179 expressions = usage.defaultValues;
180 } else { 180 } else {
181 // Use the VarDefinition found. 181 // Use the VarDefinition found.
182 expressions = (varDef.expression as Expressions).expressions; 182 expressions = (varDef.expression as Expressions).expressions;
183 } 183 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 246 }
247 } else { 247 } else {
248 // Return real CSS property. 248 // Return real CSS property.
249 return varDef; 249 return varDef;
250 } 250 }
251 } 251 }
252 252
253 // Didn't point to a var definition that existed. 253 // Didn't point to a var definition that existed.
254 return varDef; 254 return varDef;
255 } 255 }
OLDNEW
« no previous file with comments | « lib/src/analyzer.dart ('k') | lib/src/property.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698