Merge pull request #31 from leonsenft/support-ident-ie-filter
Adds support for identifier IE filters
diff --git a/lib/parser.dart b/lib/parser.dart
index a1a9823..6b05c85 100644
--- a/lib/parser.dart
+++ b/lib/parser.dart
@@ -2447,8 +2447,15 @@
* then parse to the right paren ignoring everything in between.
*/
processIEFilter(FileSpan startAfterProgidColon) {
- var parens = 0;
+ // Support non-functional filters (i.e. filter: FlipH)
+ var kind = _peek();
+ if (kind == TokenKind.SEMICOLON || kind == TokenKind.RBRACE) {
+ var tok = tokenizer.makeIEFilter(
+ startAfterProgidColon.start.offset, _peekToken.start);
+ return new LiteralTerm(tok.text, tok.text, tok.span);
+ }
+ var parens = 0;
while (_peek() != TokenKind.END_OF_FILE) {
switch (_peek()) {
case TokenKind.LPAREN:
diff --git a/pubspec.yaml b/pubspec.yaml
index 81c97a8..8ed29b6 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: csslib
-version: 0.13.5
+version: 0.13.6
author: Dart Team <misc@dartlang.org>
description: A library for parsing CSS.
homepage: https://github.com/dart-lang/csslib
diff --git a/test/declaration_test.dart b/test/declaration_test.dart
index ba12344..007916d 100644
--- a/test/declaration_test.dart
+++ b/test/declaration_test.dart
@@ -781,6 +781,17 @@
expect(stylesheet != null, true);
expect(errors.isEmpty, true, reason: errors.toString());
expect(prettyPrint(stylesheet), generated3);
+
+ final input4 = '''
+div {
+ filter: FlipH;
+}''';
+
+ stylesheet = parseCss(input4, errors: errors..clear(), opts: simpleOptions);
+
+ expect(stylesheet != null, true);
+ expect(errors.isEmpty, true, reason: errors.toString());
+ expect(prettyPrint(stylesheet), input4);
}
/**