@@ -94,7 +94,7 @@ namespace Sass {
9494 return os;
9595 }
9696
97- // Print a string representation of a SimpleSequence_Selector
97+ // Print a string representation of a Compound_Selector
9898 static void printSimpleSelector (Simple_Selector* pSimpleSelector, const char * message=NULL , bool newline=true ) {
9999
100100 if (message) {
@@ -112,12 +112,12 @@ namespace Sass {
112112 }
113113 }
114114
115- // Print a string representation of a SimpleSequence_Selector
115+ // Print a string representation of a Compound_Selector
116116 typedef std::pair<SimpleSequence_Selector*, Sequence_Selector*> SelsNewSeqPair;
117117 typedef std::vector<SelsNewSeqPair> SelsNewSeqPairCollection;
118118
119119
120- // Print a string representation of a SimpleSequence_Selector
120+ // Print a string representation of a Compound_Selector
121121 static void printCompoundSelector (SimpleSequence_Selector* pCompoundSelector, const char * message=NULL , bool newline=true ) {
122122
123123 if (message) {
@@ -169,7 +169,7 @@ namespace Sass {
169169 }
170170
171171
172- // Print a string representation of a Sequence_Selector
172+ // Print a string representation of a Complex_Selector
173173 static void printComplexSelector (Sequence_Selector* pComplexSelector, const char * message=NULL , bool newline=true ) {
174174
175175 if (message) {
@@ -288,7 +288,7 @@ namespace Sass {
288288#endif
289289
290290 static bool parentSuperselector (Sequence_Selector* pOne, Sequence_Selector* pTwo, Context& ctx) {
291- // TODO: figure out a better way to create a Sequence_Selector from scratch
291+ // TODO: figure out a better way to create a Complex_Selector from scratch
292292 // TODO: There's got to be a better way. This got ugly quick...
293293 Position noPosition (-1 , -1 , -1 );
294294 Element_Selector fakeParent (ParserState (" [FAKE]" ), " temp" );
@@ -651,7 +651,7 @@ namespace Sass {
651651
652652
653653 static bool parentSuperselector (const Node& one, const Node& two, Context& ctx) {
654- // TODO: figure out a better way to create a Sequence_Selector from scratch
654+ // TODO: figure out a better way to create a Complex_Selector from scratch
655655 // TODO: There's got to be a better way. This got ugly quick...
656656 Position noPosition (-1 , -1 , -1 );
657657 Element_Selector fakeParent (ParserState (" [FAKE]" ), " temp" );
@@ -1588,7 +1588,7 @@ namespace Sass {
15881588 Sequence_Selector* pExtComplexSelector = &seq; // The selector up to where the @extend is (ie, the thing to merge)
15891589 SimpleSequence_Selector* pExtCompoundSelector = pSels; // All the simple selectors to be replaced from the current compound selector from all extensions
15901590
1591- // TODO: This can return a SimpleSequence_Selector with no elements. Should that just be returning NULL?
1591+ // TODO: This can return a Compound_Selector with no elements. Should that just be returning NULL?
15921592 // RUBY: self_without_sel = Sass::Util.array_minus(members, sels)
15931593 SimpleSequence_Selector* pSelectorWithoutExtendSelectors = pSelector->minus (pExtCompoundSelector, ctx);
15941594
@@ -1618,8 +1618,8 @@ namespace Sass {
16181618 // next if group.map {|e, _| check_directives_match!(e, parent_directives)}.none?
16191619
16201620 // TODO: This seems a little fishy to me. See if it causes any problems. From the ruby, we should be able to just
1621- // get rid of the last SimpleSequence_Selector and replace it with this one. I think the reason this code is more
1622- // complex is that Sequence_Selector contains a combinator, but in ruby combinators have already been filtered
1621+ // get rid of the last Compound_Selector and replace it with this one. I think the reason this code is more
1622+ // complex is that Complex_Selector contains a combinator, but in ruby combinators have already been filtered
16231623 // out and aren't operated on.
16241624 Sequence_Selector* pNewSelector = pExtComplexSelector->cloneFully (ctx); // ->first();
16251625
@@ -1642,7 +1642,7 @@ namespace Sass {
16421642
16431643
16441644 // if (pSelector && pSelector->has_line_feed()) pNewInnerMost->has_line_feed(true);
1645- // Set the sources on our new Sequence_Selector to the sources of this simple sequence plus the thing we're extending.
1645+ // Set the sources on our new Complex_Selector to the sources of this simple sequence plus the thing we're extending.
16461646 DEBUG_PRINTLN (EXTEND_COMPOUND, " SOURCES SETTING ON NEW SEQ: " << complexSelectorToNode (pNewSelector, ctx))
16471647
16481648 DEBUG_EXEC (EXTEND_COMPOUND, SourcesSet oldSet = pNewSelector->sources (); printSourcesSet (oldSet, ctx, " SOURCES NEW SEQ BEGIN: " ))
@@ -1723,7 +1723,7 @@ namespace Sass {
17231723
17241724 if (pHead) {
17251725 if (seen.find (*pHead) == seen.end ()) {
1726- for (Simple_Selector* pSimple : * pHead) {
1726+ for (Simple_Selector* pSimple : pHead-> elements () ) {
17271727 if (Wrapped_Selector* ws = dynamic_cast <Wrapped_Selector*>(pSimple)) {
17281728 if (CommaSequence_Selector* sl = dynamic_cast <CommaSequence_Selector*>(ws->selector ())) {
17291729 for (Sequence_Selector* cs : sl->elements ()) {
@@ -1809,7 +1809,7 @@ namespace Sass {
18091809 // RUBY: next [[sseq_or_op]] unless sseq_or_op.is_a?(SimpleSequence)
18101810 if (!sseqOrOp.isSelector ()) {
18111811 // Wrap our Combinator in two collections to match ruby. This is essentially making a collection Node
1812- // with one collection child. The collection child represents a Sequence_Selector that is only a combinator.
1812+ // with one collection child. The collection child represents a Complex_Selector that is only a combinator.
18131813 Node outer = Node::createCollection ();
18141814 Node inner = Node::createCollection ();
18151815 outer.collection ()->push_back (inner);
@@ -1826,7 +1826,7 @@ namespace Sass {
18261826 DEBUG_PRINTLN (EXTEND_COMPLEX, " EXTENDED: " << extended)
18271827
18281828
1829- // Prepend the SimpleSequence_Selector based on the choices logic; choices seems to be extend but with an ruby Array instead of a Sequence
1829+ // Prepend the Compound_Selector based on the choices logic; choices seems to be extend but with an ruby Array instead of a Sequence
18301830 // due to the member mapping: choices = extended.map {|seq| seq.members}
18311831 Sequence_Selector* pJustCurrentCompoundSelector = sseqOrOp.selector ();
18321832
@@ -1961,7 +1961,7 @@ namespace Sass {
19611961 pNewSelectors = remove_placeholders.remove_placeholders (pNewSelectors);
19621962
19631963 // unwrap all wrapped selectors with inner lists
1964- for (Sequence_Selector* cur : * pNewSelectors) {
1964+ for (Sequence_Selector* cur : pNewSelectors-> elements () ) {
19651965 // process tails
19661966 while (cur) {
19671967 // process header
@@ -1970,7 +1970,7 @@ namespace Sass {
19701970 recseen.insert (*cur->head ());
19711971 // create a copy since we add multiple items if stuff get unwrapped
19721972 SimpleSequence_Selector* cpy_head = SASS_MEMORY_NEW (ctx.mem , SimpleSequence_Selector, cur->pstate ());
1973- for (Simple_Selector* hs : * cur->head ()) {
1973+ for (Simple_Selector* hs : cur->head ()-> elements ()) {
19741974 if (Wrapped_Selector* ws = dynamic_cast <Wrapped_Selector*>(hs)) {
19751975 if (CommaSequence_Selector* sl = dynamic_cast <CommaSequence_Selector*>(ws->selector ())) {
19761976 // special case for ruby ass
@@ -2092,7 +2092,8 @@ namespace Sass {
20922092 // we set `extended` flag on extended selectors
20932093 if (b->is_root ()) {
20942094 // debug_subset_map(subset_map);
2095- for (auto const &it : subset_map.values ()) {
2095+ auto values = subset_map.values ();
2096+ for (auto it : values) {
20962097 Sequence_Selector* sel = it.first ? it.first ->first () : NULL ;
20972098 SimpleSequence_Selector* ext = it.second ? it.second : NULL ;
20982099 if (ext && (ext->extended () || ext->is_optional ())) continue ;
@@ -2127,7 +2128,7 @@ namespace Sass {
21272128
21282129 void Extend::operator ()(Directive* a)
21292130 {
2130- // CommaSequence_Selector * ls = dynamic_cast<CommaSequence_Selector *>(a->selector());
2131+ // Selector_List * ls = dynamic_cast<Selector_List *>(a->selector());
21312132 // selector_stack.push_back(ls);
21322133 if (a->block ()) a->block ()->perform (this );
21332134 // exp.selector_stack.pop_back();
0 commit comments