@@ -707,6 +707,7 @@ PARSER_END(GssParserCC)
707
707
// Special handling needed because ':not' takes simple selectors as
708
708
// an argument.
709
709
| < NOTFUNCTION: "not" <LEFTROUND> >
710
+ | < SLOTTEDFUNCTION: ":slotted" <LEFTROUND> >
710
711
| < LANGFUNCTION: "lang" <LEFTROUND> >
711
712
712
713
// "calc("
@@ -906,11 +907,22 @@ CssRefinerNode pseudo() :
906
907
String pseudo = null;
907
908
String argument = null;
908
909
List<Token> tokens = Lists.newArrayList();
909
- CssSelectorNode notSelector = null;
910
+ CssSelectorNode innerSelector = null;
910
911
}
911
912
{
912
913
t = <COLON> { beginLocation = this.getLocation(); tokens.add(t); }
913
914
( ( t = <IDENTIFIER> { pseudo = t.image; tokens.add(t); } )
915
+ |
916
+ ( // ::slotted( simple_selector )
917
+ t = <SLOTTEDFUNCTION> ( <S> )* { beginLocation = this.getLocation();
918
+ pseudo = t.image; tokens.add(t); }
919
+ innerSelector = simpleSelector()
920
+ ( <S> )*
921
+ t = <RIGHTROUND> { tokens.add(t);
922
+ endLocation = this.getLocation();
923
+ return nodeBuilder.buildPseudoClassNode(pseudo, innerSelector,
924
+ this.mergeLocations(beginLocation, endLocation), tokens); }
925
+ )
914
926
|
915
927
( // ::identifier (pseudo-element)
916
928
t = <COLON> { tokens.add(t); }
@@ -923,11 +935,11 @@ CssRefinerNode pseudo() :
923
935
( // :not( simple_selector )
924
936
t = <NOTFUNCTION> ( <S> )* { beginLocation = this.getLocation();
925
937
pseudo = t.image; tokens.add(t); }
926
- notSelector = simpleSelector()
938
+ innerSelector = simpleSelector()
927
939
( <S> )*
928
940
t = <RIGHTROUND> { tokens.add(t);
929
941
endLocation = this.getLocation();
930
- return nodeBuilder.buildPseudoClassNode(pseudo, notSelector ,
942
+ return nodeBuilder.buildPseudoClassNode(pseudo, innerSelector ,
931
943
this.mergeLocations(beginLocation, endLocation), tokens); }
932
944
)
933
945
|
0 commit comments