File tree 3 files changed +15
-9
lines changed
3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -576,8 +576,12 @@ namespace Sass {
576
576
// Prepare data structures
577
577
choices.push_back (expanded);
578
578
choices.push_back ({ group });
579
- groups1.erase (groups1.begin ());
580
- groups2.erase (groups2.begin ());
579
+ if (!groups1.empty ()) {
580
+ groups1.erase (groups1.begin ());
581
+ }
582
+ if (!groups2.empty ()) {
583
+ groups2.erase (groups2.begin ());
584
+ }
581
585
582
586
}
583
587
Original file line number Diff line number Diff line change @@ -690,9 +690,9 @@ namespace Sass {
690
690
b->op (), s_l->last (), b->right ());
691
691
bin_ex->is_delayed (b->left ()->is_delayed () || b->right ()->is_delayed ()); // unverified
692
692
for (size_t i = 0 ; i < s_l->length () - 1 ; ++i) {
693
- ret_schema->append (Cast<PreValue>( s_l->at (i)->perform (this ) ));
693
+ ret_schema->append (s_l->at (i)->perform (this ));
694
694
}
695
- ret_schema->append (Cast<PreValue>( bin_ex->perform (this ) ));
695
+ ret_schema->append (bin_ex->perform (this ));
696
696
return ret_schema->perform (this );
697
697
}
698
698
}
@@ -703,9 +703,9 @@ namespace Sass {
703
703
Binary_Expression_Obj bin_ex = SASS_MEMORY_NEW (Binary_Expression, b->pstate (),
704
704
b->op (), b->left (), s_r->first ());
705
705
bin_ex->is_delayed (b->left ()->is_delayed () || b->right ()->is_delayed ()); // verified
706
- ret_schema->append (Cast<PreValue>( bin_ex->perform (this ) ));
706
+ ret_schema->append (bin_ex->perform (this ));
707
707
for (size_t i = 1 ; i < s_r->length (); ++i) {
708
- ret_schema->append (Cast<PreValue>( s_r->at (i)->perform (this ) ));
708
+ ret_schema->append (s_r->at (i)->perform (this ));
709
709
}
710
710
return ret_schema->perform (this );
711
711
}
Original file line number Diff line number Diff line change @@ -140,10 +140,12 @@ namespace Sass {
140
140
// parent selector only allowed at start
141
141
// upcoming Sass may allow also trailing
142
142
ParserState state (pstate);
143
- SimpleSelectorObj prev = (*seq)[seq->length ()-1 ];
144
- std::string sel (prev->to_string ({ NESTED, 5 }));
145
143
std::string found (" &" );
146
- if (lex < identifier >()) { found += std::string (lexed); }
144
+ if (lex < identifier >()) {
145
+ found += std::string (lexed);
146
+ }
147
+ std::string sel (seq->hasRealParent () ? " &" : " " );
148
+ if (!seq->empty ()) { sel = seq->last ()->to_string ({ NESTED, 5 }); }
147
149
// ToDo: parser should throw parser exceptions
148
150
error (" Invalid CSS after \" " + sel + " \" : expected \" {\" , was \" " + found + " \"\n\n "
149
151
" \" " + found + " \" may only be used at the beginning of a compound selector." , state);
You can’t perform that action at this time.
0 commit comments