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

Unified Diff: pkg/csslib/lib/parser.dart

Issue 23868008: Added polyfill for var (moved from web_ui) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merged Created 7 years, 3 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
« no previous file with comments | « no previous file | pkg/csslib/lib/src/polyfill.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/csslib/lib/parser.dart
diff --git a/pkg/csslib/lib/parser.dart b/pkg/csslib/lib/parser.dart
index a1cd7158da23e7846555c79815108cc46a231401..9f7b3ff1de6992ca3436d664e45a148d9afb8a5d 100644
--- a/pkg/csslib/lib/parser.dart
+++ b/pkg/csslib/lib/parser.dart
@@ -13,6 +13,7 @@ import 'src/messages.dart';
import 'src/options.dart';
part 'src/analyzer.dart';
+part 'src/polyfill.dart';
part 'src/property.dart';
part 'src/token.dart';
part 'src/tokenizer_base.dart';
@@ -44,7 +45,8 @@ bool get isChecked => messages.options.checked;
// TODO(terry): Remove nested name parameter.
/** Parse and analyze the CSS file. */
-StyleSheet compile(var input, {List errors, List options, bool nested: true}) {
+StyleSheet compile(var input,
+ {List errors, List options, bool nested: true, bool polyfill: false}) {
var source = _inputAsString(input);
_createMessages(errors: errors, options: options);
@@ -55,6 +57,11 @@ StyleSheet compile(var input, {List errors, List options, bool nested: true}) {
analyze([tree], errors: errors, options: options);
+ if (polyfill) {
+ var processCss = new PolyFill(messages, true);
+ processCss.process(tree);
+ }
+
return tree;
}
« no previous file with comments | « no previous file | pkg/csslib/lib/src/polyfill.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698