This repository was archived by the owner on Oct 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Expand file tree Collapse file tree 3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -576,8 +576,12 @@ namespace Sass {
576576 // Prepare data structures
577577 choices.push_back (expanded);
578578 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+ }
581585
582586 }
583587
Original file line number Diff line number Diff line change @@ -690,9 +690,9 @@ namespace Sass {
690690 b->op (), s_l->last (), b->right ());
691691 bin_ex->is_delayed (b->left ()->is_delayed () || b->right ()->is_delayed ()); // unverified
692692 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 ));
694694 }
695- ret_schema->append (Cast<PreValue>( bin_ex->perform (this ) ));
695+ ret_schema->append (bin_ex->perform (this ));
696696 return ret_schema->perform (this );
697697 }
698698 }
@@ -703,9 +703,9 @@ namespace Sass {
703703 Binary_Expression_Obj bin_ex = SASS_MEMORY_NEW (Binary_Expression, b->pstate (),
704704 b->op (), b->left (), s_r->first ());
705705 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 ));
707707 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 ));
709709 }
710710 return ret_schema->perform (this );
711711 }
Original file line number Diff line number Diff line change @@ -140,10 +140,12 @@ namespace Sass {
140140 // parent selector only allowed at start
141141 // upcoming Sass may allow also trailing
142142 ParserState state (pstate);
143- SimpleSelectorObj prev = (*seq)[seq->length ()-1 ];
144- std::string sel (prev->to_string ({ NESTED, 5 }));
145143 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 }); }
147149 // ToDo: parser should throw parser exceptions
148150 error (" Invalid CSS after \" " + sel + " \" : expected \" {\" , was \" " + found + " \"\n\n "
149151 " \" " + 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