@@ -1992,12 +1992,12 @@ namespace Sass {
1992
1992
}
1993
1993
1994
1994
virtual ~Simple_Selector () = 0 ;
1995
- virtual Compound_Selector * unify_with (Compound_Selector *, Context&);
1995
+ virtual SimpleSequence_Selector * unify_with (SimpleSequence_Selector *, Context&);
1996
1996
virtual bool has_parent_ref () { return false ; };
1997
1997
virtual bool is_pseudo_element () { return false ; }
1998
1998
virtual bool is_pseudo_class () { return false ; }
1999
1999
2000
- virtual bool is_superselector_of (Compound_Selector * sub) { return false ; }
2000
+ virtual bool is_superselector_of (SimpleSequence_Selector * sub) { return false ; }
2001
2001
2002
2002
bool operator ==(const Simple_Selector& rhs) const ;
2003
2003
inline bool operator !=(const Simple_Selector& rhs) const { return !(*this == rhs); }
@@ -2013,7 +2013,7 @@ namespace Sass {
2013
2013
// The Parent Selector Expression.
2014
2014
// ////////////////////////////////
2015
2015
// parent selectors can occur in selectors but also
2016
- // inside strings in declarations (Compound_Selector ).
2016
+ // inside strings in declarations (SimpleSequence_Selector ).
2017
2017
// only one simple parent selector means the first case.
2018
2018
class Parent_Selector : public Simple_Selector {
2019
2019
public:
@@ -2061,7 +2061,7 @@ namespace Sass {
2061
2061
else return Constants::Specificity_Element;
2062
2062
}
2063
2063
virtual Simple_Selector* unify_with (Simple_Selector*, Context&);
2064
- virtual Compound_Selector * unify_with (Compound_Selector *, Context&);
2064
+ virtual SimpleSequence_Selector * unify_with (SimpleSequence_Selector *, Context&);
2065
2065
ATTACH_OPERATIONS ()
2066
2066
};
2067
2067
@@ -2084,7 +2084,7 @@ namespace Sass {
2084
2084
if (name ()[0 ] == ' .' ) return Constants::Specificity_Class;
2085
2085
else return Constants::Specificity_Element;
2086
2086
}
2087
- virtual Compound_Selector * unify_with (Compound_Selector *, Context&);
2087
+ virtual SimpleSequence_Selector * unify_with (SimpleSequence_Selector *, Context&);
2088
2088
ATTACH_OPERATIONS ()
2089
2089
};
2090
2090
@@ -2180,7 +2180,7 @@ namespace Sass {
2180
2180
bool operator ==(const Pseudo_Selector& rhs) const ;
2181
2181
bool operator <(const Simple_Selector& rhs) const ;
2182
2182
bool operator <(const Pseudo_Selector& rhs) const ;
2183
- virtual Compound_Selector * unify_with (Compound_Selector *, Context&);
2183
+ virtual SimpleSequence_Selector * unify_with (SimpleSequence_Selector *, Context&);
2184
2184
ATTACH_OPERATIONS ()
2185
2185
};
2186
2186
@@ -2233,7 +2233,7 @@ namespace Sass {
2233
2233
// any parent references or placeholders, to simplify expansion.
2234
2234
// //////////////////////////////////////////////////////////////////////////
2235
2235
typedef std::set<Sequence_Selector*, Sequence_Selector_Pointer_Compare> SourcesSet;
2236
- class Compound_Selector : public Selector , public Vectorized <Simple_Selector*> {
2236
+ class SimpleSequence_Selector : public Selector , public Vectorized <Simple_Selector*> {
2237
2237
private:
2238
2238
SourcesSet sources_;
2239
2239
ADD_PROPERTY (bool , extended);
@@ -2245,7 +2245,7 @@ namespace Sass {
2245
2245
if (s->has_placeholder ()) has_placeholder (true );
2246
2246
}
2247
2247
public:
2248
- Compound_Selector (ParserState pstate, size_t s = 0 )
2248
+ SimpleSequence_Selector (ParserState pstate, size_t s = 0 )
2249
2249
: Selector(pstate),
2250
2250
Vectorized<Simple_Selector*>(s),
2251
2251
extended_ (false ),
@@ -2264,13 +2264,13 @@ namespace Sass {
2264
2264
}
2265
2265
2266
2266
Sequence_Selector* to_complex (Memory_Manager& mem);
2267
- Compound_Selector * unify_with (Compound_Selector * rhs, Context& ctx);
2267
+ SimpleSequence_Selector * unify_with (SimpleSequence_Selector * rhs, Context& ctx);
2268
2268
// virtual Placeholder_Selector* find_placeholder();
2269
2269
virtual bool has_parent_ref ();
2270
2270
Simple_Selector* base ()
2271
2271
{
2272
2272
// Implement non-const in terms of const. Safe to const_cast since this method is non-const
2273
- return const_cast <Simple_Selector*>(static_cast <const Compound_Selector *>(this )->base ());
2273
+ return const_cast <Simple_Selector*>(static_cast <const SimpleSequence_Selector *>(this )->base ());
2274
2274
}
2275
2275
const Simple_Selector* base () const {
2276
2276
if (length () == 0 ) return 0 ;
@@ -2279,7 +2279,7 @@ namespace Sass {
2279
2279
return (*this )[0 ];
2280
2280
return 0 ;
2281
2281
}
2282
- virtual bool is_superselector_of (Compound_Selector * sub, std::string wrapped = " " );
2282
+ virtual bool is_superselector_of (SimpleSequence_Selector * sub, std::string wrapped = " " );
2283
2283
virtual bool is_superselector_of (Sequence_Selector* sub, std::string wrapped = " " );
2284
2284
virtual bool is_superselector_of (CommaSequence_Selector* sub, std::string wrapped = " " );
2285
2285
virtual size_t hash ()
@@ -2314,18 +2314,18 @@ namespace Sass {
2314
2314
}
2315
2315
std::vector<std::string> to_str_vec (); // sometimes need to convert to a flat "by-value" data structure
2316
2316
2317
- bool operator <(const Compound_Selector & rhs) const ;
2317
+ bool operator <(const SimpleSequence_Selector & rhs) const ;
2318
2318
2319
- bool operator ==(const Compound_Selector & rhs) const ;
2320
- inline bool operator !=(const Compound_Selector & rhs) const { return !(*this == rhs); }
2319
+ bool operator ==(const SimpleSequence_Selector & rhs) const ;
2320
+ inline bool operator !=(const SimpleSequence_Selector & rhs) const { return !(*this == rhs); }
2321
2321
2322
2322
SourcesSet& sources () { return sources_; }
2323
2323
void clearSources () { sources_.clear (); }
2324
2324
void mergeSources (SourcesSet& sources, Context& ctx);
2325
2325
2326
- Compound_Selector * clone (Context&) const ; // does not clone the Simple_Selector*s
2326
+ SimpleSequence_Selector * clone (Context&) const ; // does not clone the Simple_Selector*s
2327
2327
2328
- Compound_Selector * minus (Compound_Selector * rhs, Context& ctx);
2328
+ SimpleSequence_Selector * minus (SimpleSequence_Selector * rhs, Context& ctx);
2329
2329
ATTACH_OPERATIONS ()
2330
2330
};
2331
2331
@@ -2339,7 +2339,7 @@ namespace Sass {
2339
2339
enum Combinator { ANCESTOR_OF, PARENT_OF, PRECEDES, ADJACENT_TO, REFERENCE };
2340
2340
private:
2341
2341
ADD_PROPERTY (Combinator, combinator)
2342
- ADD_PROPERTY (Compound_Selector *, head)
2342
+ ADD_PROPERTY (SimpleSequence_Selector *, head)
2343
2343
ADD_PROPERTY (Sequence_Selector*, tail)
2344
2344
ADD_PROPERTY (String*, reference);
2345
2345
public:
@@ -2350,7 +2350,7 @@ namespace Sass {
2350
2350
};
2351
2351
Sequence_Selector (ParserState pstate,
2352
2352
Combinator c = ANCESTOR_OF,
2353
- Compound_Selector * h = 0 ,
2353
+ SimpleSequence_Selector * h = 0 ,
2354
2354
Sequence_Selector* t = 0 ,
2355
2355
String* r = 0 )
2356
2356
: Selector(pstate),
@@ -2405,7 +2405,7 @@ namespace Sass {
2405
2405
2406
2406
size_t length () const ;
2407
2407
CommaSequence_Selector* resolve_parent_refs (Context& ctx, CommaSequence_Selector* parents, bool implicit_parent);
2408
- virtual bool is_superselector_of (Compound_Selector * sub, std::string wrapping = " " );
2408
+ virtual bool is_superselector_of (SimpleSequence_Selector * sub, std::string wrapping = " " );
2409
2409
virtual bool is_superselector_of (Sequence_Selector* sub, std::string wrapping = " " );
2410
2410
virtual bool is_superselector_of (CommaSequence_Selector* sub, std::string wrapping = " " );
2411
2411
// virtual Placeholder_Selector* find_placeholder();
@@ -2451,7 +2451,7 @@ namespace Sass {
2451
2451
2452
2452
SourcesSet srcs;
2453
2453
2454
- Compound_Selector * pHead = head ();
2454
+ SimpleSequence_Selector * pHead = head ();
2455
2455
Sequence_Selector* pTail = tail ();
2456
2456
2457
2457
if (pHead) {
@@ -2470,7 +2470,7 @@ namespace Sass {
2470
2470
// members.map! {|m| m.is_a?(SimpleSequence) ? m.with_more_sources(sources) : m}
2471
2471
Sequence_Selector* pIter = this ;
2472
2472
while (pIter) {
2473
- Compound_Selector * pHead = pIter->head ();
2473
+ SimpleSequence_Selector * pHead = pIter->head ();
2474
2474
2475
2475
if (pHead) {
2476
2476
pHead->mergeSources (sources, ctx);
@@ -2482,7 +2482,7 @@ namespace Sass {
2482
2482
void clearSources () {
2483
2483
Sequence_Selector* pIter = this ;
2484
2484
while (pIter) {
2485
- Compound_Selector * pHead = pIter->head ();
2485
+ SimpleSequence_Selector * pHead = pIter->head ();
2486
2486
2487
2487
if (pHead) {
2488
2488
pHead->clearSources ();
@@ -2491,14 +2491,14 @@ namespace Sass {
2491
2491
pIter = pIter->tail ();
2492
2492
}
2493
2493
}
2494
- Sequence_Selector* clone (Context&) const ; // does not clone Compound_Selector *s
2495
- Sequence_Selector* cloneFully (Context&) const ; // clones Compound_Selector *s
2496
- // std::vector<Compound_Selector *> to_vector();
2494
+ Sequence_Selector* clone (Context&) const ; // does not clone SimpleSequence_Selector *s
2495
+ Sequence_Selector* cloneFully (Context&) const ; // clones SimpleSequence_Selector *s
2496
+ // std::vector<SimpleSequence_Selector *> to_vector();
2497
2497
ATTACH_OPERATIONS ()
2498
2498
};
2499
2499
2500
2500
typedef std::deque<Sequence_Selector*> ComplexSelectorDeque;
2501
- typedef Subset_Map<std::string, std::pair<Sequence_Selector*, Compound_Selector *> > ExtensionSubsetMap;
2501
+ typedef Subset_Map<std::string, std::pair<Sequence_Selector*, SimpleSequence_Selector *> > ExtensionSubsetMap;
2502
2502
2503
2503
// /////////////////////////////////
2504
2504
// Comma-separated selector groups.
@@ -2518,7 +2518,7 @@ namespace Sass {
2518
2518
void remove_parent_selectors ();
2519
2519
// virtual Placeholder_Selector* find_placeholder();
2520
2520
CommaSequence_Selector* resolve_parent_refs (Context& ctx, CommaSequence_Selector* parents, bool implicit_parent = true );
2521
- virtual bool is_superselector_of (Compound_Selector * sub, std::string wrapping = " " );
2521
+ virtual bool is_superselector_of (SimpleSequence_Selector * sub, std::string wrapping = " " );
2522
2522
virtual bool is_superselector_of (Sequence_Selector* sub, std::string wrapping = " " );
2523
2523
virtual bool is_superselector_of (CommaSequence_Selector* sub, std::string wrapping = " " );
2524
2524
CommaSequence_Selector* unify_with (CommaSequence_Selector*, Context&);
@@ -2554,8 +2554,8 @@ namespace Sass {
2554
2554
}
2555
2555
return false ;
2556
2556
}
2557
- CommaSequence_Selector* clone (Context&) const ; // does not clone Compound_Selector *s
2558
- CommaSequence_Selector* cloneFully (Context&) const ; // clones Compound_Selector *s
2557
+ CommaSequence_Selector* clone (Context&) const ; // does not clone SimpleSequence_Selector *s
2558
+ CommaSequence_Selector* cloneFully (Context&) const ; // clones SimpleSequence_Selector *s
2559
2559
virtual bool operator ==(const Selector& rhs) const ;
2560
2560
virtual bool operator ==(const CommaSequence_Selector& rhs) const ;
2561
2561
// Selector Lists can be compared to comma lists
@@ -2570,10 +2570,10 @@ namespace Sass {
2570
2570
// is required for proper stl collection ordering) is implemented using string comparision. This gives stable sorting
2571
2571
// behavior, and can be used to determine if the selectors would have exactly idential output. operator== matches the
2572
2572
// ruby sass implementations for eql, which sometimes perform order independent comparisions (like set comparisons of the
2573
- // members of a SimpleSequence (Compound_Selector )).
2573
+ // members of a SimpleSequence (SimpleSequence_Selector )).
2574
2574
//
2575
2575
// Due to the reliance on operator== and operater< behavior, this templated method is currently only intended for
2576
- // use with Compound_Selector and Sequence_Selector objects.
2576
+ // use with SimpleSequence_Selector and Sequence_Selector objects.
2577
2577
if (simpleSelectorOrderDependent) {
2578
2578
return !(one < two) && !(two < one);
2579
2579
} else {
@@ -2583,7 +2583,7 @@ namespace Sass {
2583
2583
2584
2584
// compare function for sorting and probably other other uses
2585
2585
struct cmp_complex_selector { inline bool operator () (const Sequence_Selector* l, const Sequence_Selector* r) { return (*l < *r); } };
2586
- struct cmp_compound_selector { inline bool operator () (const Compound_Selector * l, const Compound_Selector * r) { return (*l < *r); } };
2586
+ struct cmp_compound_selector { inline bool operator () (const SimpleSequence_Selector * l, const SimpleSequence_Selector * r) { return (*l < *r); } };
2587
2587
struct cmp_simple_selector { inline bool operator () (const Simple_Selector* l, const Simple_Selector* r) { return (*l < *r); } };
2588
2588
2589
2589
}
0 commit comments