@@ -253,7 +253,7 @@ namespace Sass {
253
253
else error (" expecting another url or quoted path in @import list" , pstate);
254
254
}
255
255
first = false ;
256
- } while (lex < exactly<' ,' > >());
256
+ } while (lex_css < exactly<' ,' > >());
257
257
return imp;
258
258
}
259
259
@@ -286,7 +286,7 @@ namespace Sass {
286
286
// if there's anything there at all
287
287
if (!peek< exactly<' )' > >()) {
288
288
do (*params) << parse_parameter ();
289
- while (lex< alternatives < spaces,block_comment, exactly<' ,' > > >());
289
+ while (lex_css< exactly<' ,' > >());
290
290
}
291
291
while (lex< alternatives < spaces, block_comment > >()) {};
292
292
if (!lex< exactly<' )' > >()) error (" expected a variable name (e.g. $x) or ')' for the parameter list for " + name, pstate);
@@ -339,7 +339,7 @@ namespace Sass {
339
339
// if there's anything there at all
340
340
if (!peek< exactly<' )' > >()) {
341
341
do (*args) << parse_argument ();
342
- while (lex< alternatives < block_comment, exactly<' ,' > > >());
342
+ while (lex_css< exactly<' ,' > >());
343
343
}
344
344
while (lex< block_comment >());
345
345
if (!lex< exactly<' )' > >()) error (" expected a variable name (e.g. $x) or ')' for the parameter list for " + name, pstate);
@@ -505,7 +505,7 @@ namespace Sass {
505
505
}
506
506
if (peek_newline ()) ref_wrap->has_line_break (true );
507
507
}
508
- while (peek< sequence < optional_css_whitespace, optional < block_comment >, exactly<' ,' > > >())
508
+ while (peek_css< exactly<' ,' > >())
509
509
{
510
510
// consume everything up and including the comma speparator
511
511
reloop = lex< sequence < optional_css_comments, exactly<' ,' > > >() != 0 ;
@@ -528,7 +528,7 @@ namespace Sass {
528
528
{
529
529
Position sel_source_position (-1 );
530
530
Compound_Selector* lhs;
531
- if (peek < alternatives <
531
+ if (peek_css < alternatives <
532
532
exactly<' +' >,
533
533
exactly<' ~' >,
534
534
exactly<' >' >
@@ -549,7 +549,7 @@ namespace Sass {
549
549
bool cpx_lf = peek_newline ();
550
550
551
551
Complex_Selector* rhs;
552
- if (peek < alternatives <
552
+ if (peek_css < alternatives <
553
553
exactly<' ,' >,
554
554
exactly<' )' >,
555
555
exactly<' {' >,
@@ -589,10 +589,10 @@ namespace Sass {
589
589
return seq;
590
590
}
591
591
}
592
- if (sawsomething && lex < sequence< negate< functional >, alternatives< identifier_fragment, universal, quoted_string, dimension, percentage, number > > >()) {
592
+ if (sawsomething && lex_css < sequence< negate< functional >, alternatives< identifier_fragment, universal, quoted_string, dimension, percentage, number > > >()) {
593
593
// saw an ampersand, then allow type selectors with arbitrary number of hyphens at the beginning
594
594
(*seq) << new (ctx.mem ) Type_Selector (pstate, unquote (lexed));
595
- } else if (lex < sequence< negate< functional >, alternatives< type_selector, universal, quoted_string, dimension, percentage, number > > >()) {
595
+ } else if (lex_css < sequence< negate< functional >, alternatives< type_selector, universal, quoted_string, dimension, percentage, number > > >()) {
596
596
// if you see a type selector
597
597
(*seq) << new (ctx.mem ) Type_Selector (pstate, lexed);
598
598
sawsomething = true ;
@@ -603,14 +603,15 @@ namespace Sass {
603
603
}
604
604
605
605
while (!peek< spaces >(position) &&
606
- !(peek < alternatives < exactly<' +' >,
607
- exactly<' ~' >,
608
- exactly<' >' >,
609
- exactly<' ,' >,
610
- exactly<' )' >,
611
- exactly<' {' >,
612
- exactly<' }' >,
613
- exactly<' ;' >
606
+ !(peek_css < alternatives <
607
+ exactly<' +' >,
608
+ exactly<' ~' >,
609
+ exactly<' >' >,
610
+ exactly<' ,' >,
611
+ exactly<' )' >,
612
+ exactly<' {' >,
613
+ exactly<' }' >,
614
+ exactly<' ;' >
614
615
> >(position))) {
615
616
(*seq) << parse_simple_selector ();
616
617
}
@@ -619,6 +620,7 @@ namespace Sass {
619
620
620
621
Simple_Selector* Parser::parse_simple_selector ()
621
622
{
623
+ lex < css_comments >();
622
624
if (lex< id_name >() || lex< class_name >()) {
623
625
return new (ctx.mem ) Selector_Qualifier (pstate, unquote (lexed));
624
626
}
@@ -725,29 +727,29 @@ namespace Sass {
725
727
726
728
Attribute_Selector* Parser::parse_attribute_selector ()
727
729
{
728
- lex < exactly<' [' > >();
730
+ lex_css < exactly<' [' > >();
729
731
ParserState p = pstate;
730
- if (!lex < attribute_name >()) error (" invalid attribute name in attribute selector" , pstate);
732
+ if (!lex_css < attribute_name >()) error (" invalid attribute name in attribute selector" , pstate);
731
733
string name (lexed);
732
- if (lex < exactly<' ]' > >()) return new (ctx.mem ) Attribute_Selector (p, name, " " , 0 );
733
- if (!lex < alternatives< exact_match, class_match, dash_match,
734
- prefix_match, suffix_match, substring_match > >()) {
734
+ if (lex_css < exactly<' ]' > >()) return new (ctx.mem ) Attribute_Selector (p, name, " " , 0 );
735
+ if (!lex_css < alternatives< exact_match, class_match, dash_match,
736
+ prefix_match, suffix_match, substring_match > >()) {
735
737
error (" invalid operator in attribute selector for " + name, pstate);
736
738
}
737
739
string matcher (lexed);
738
740
739
741
String* value = 0 ;
740
- if (lex < identifier >()) {
742
+ if (lex_css < identifier >()) {
741
743
value = new (ctx.mem ) String_Constant (p, lexed);
742
744
}
743
- else if (lex < quoted_string >()) {
745
+ else if (lex_css < quoted_string >()) {
744
746
value = parse_interpolated_chunk (lexed, true ); // needed!
745
747
}
746
748
else {
747
749
error (" expected a string constant or identifier in attribute selector for " + name, pstate);
748
750
}
749
751
750
- if (!lex < exactly<' ]' > >()) error (" unterminated attribute selector for " + name, pstate);
752
+ if (!lex_css < exactly<' ]' > >()) error (" unterminated attribute selector for " + name, pstate);
751
753
return new (ctx.mem ) Attribute_Selector (p, name, matcher, value);
752
754
}
753
755
@@ -979,10 +981,10 @@ namespace Sass {
979
981
Map* map = new (ctx.mem ) Map (pstate, 1 );
980
982
(*map) << make_pair (key, value);
981
983
982
- while (lex < exactly<' ,' > >())
984
+ while (lex_css < exactly<' ,' > >())
983
985
{
984
986
// allow trailing commas - #495
985
- if (peek < exactly<' )' > >(position))
987
+ if (peek_css < exactly<' )' > >(position))
986
988
{ break ; }
987
989
988
990
Expression* key = parse_list ();
0 commit comments