From 02a9780b436046594362f76da757653c15d513e4 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Fri, 19 Aug 2016 14:16:52 -0700 Subject: [PATCH] Fix selector pseudo parsing. --- lib/src/parser.dart | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/src/parser.dart b/lib/src/parser.dart index 84095451..ec7223dd 100644 --- a/lib/src/parser.dart +++ b/lib/src/parser.dart @@ -15,11 +15,11 @@ import 'util/character.dart'; import 'utils.dart'; import 'value.dart'; -final _selectorPseudoClasses = - new Set.from(["not" "matches" "current" "any" "has" "host" "host-context"]); +final _selectorPseudoClasses = new Set.from( + ["not", "matches", "current", "any", "has", "host", "host-context"]); final _prefixedSelectorPseudoClasses = - new Set.from(["nth-child" "nth-last-child"]); + new Set.from(["nth-child", "nth-last-child"]); class Parser { final SpanScanner _scanner; @@ -984,12 +984,19 @@ class Parser { component = Combinator.followingSibling; break; - case $lbrace: - case $comma: - break loop; + case $lbracket: + case $dot: + case $hash: + case $percent: + case $colon: + case $ampersand: + case $asterisk: + case $pipe: + component = _compoundSelector(); + break; default: - if (next == null) break loop; + if (next == null || !_lookingAtInterpolatedIdentifier()) break loop; component = _compoundSelector(); break; }