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

Unified Diff: lib/parser.dart

Issue 13154004: import support (removed @include) (Closed) Base URL: https://github.com/dart-lang/csslib.git@master
Patch Set: Created 7 years, 9 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 | lib/src/css_printer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/parser.dart
diff --git a/lib/parser.dart b/lib/parser.dart
index e6fa126a6695f7f4abd6b93cc682dadb3598f907..2a982337ecde25797f4c9e9dad89eaab2e211a27 100644
--- a/lib/parser.dart
+++ b/lib/parser.dart
@@ -385,7 +385,6 @@ class Parser {
// import: '@import' [string | URI] media_list?
// media: '@media' media_query_list '{' ruleset '}'
// page: '@page' [':' IDENT]? '{' declarations '}'
- // include: '@include' [string | URI]
// stylet: '@stylet' IDENT '{' ruleset '}'
// media_query_list: IDENT [',' IDENT]
// keyframes: '@-webkit-keyframes ...' (see grammar below).
@@ -560,26 +559,6 @@ class Parser {
_next();
return new FontFaceDirective(processDeclarations(), _makeSpan(start));
- case TokenKind.DIRECTIVE_INCLUDE:
- _next();
- String relativeUrl = processQuotedString(false);
- String url = '$_baseUrl/$relativeUrl';
- // Does CSS file exist?
- // TODO(sigmund,terry): this code seemed to be broken and unreachable
- if (_otherFiles.containsKey(url)) {
- var contents = _otherFiles[url];
- Parser parser = new Parser(new File.text(url, contents), contents,
- otherFiles: _otherFiles, start: 0, baseUrl: _baseUrl);
- StyleSheet stylesheet = parser.parse();
- return new IncludeDirective(
- relativeUrl, stylesheet, _makeSpan(start));
- }
-
- _error('file doesn\'t exist $relativeUrl', _peekToken.span);
-
- print("WARNING: @include doesn't work for uitest");
- return new IncludeDirective(relativeUrl, null, _makeSpan(start));
-
case TokenKind.DIRECTIVE_STYLET:
/* Stylet grammar:
*
« no previous file with comments | « no previous file | lib/src/css_printer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698