@@ -2224,15 +2224,15 @@ namespace Sass {
2224
2224
ATTACH_OPERATIONS ()
2225
2225
};
2226
2226
2227
- struct Complex_Selector_Pointer_Compare {
2228
- bool operator () (const Complex_Selector * const pLeft, const Complex_Selector * const pRight) const ;
2227
+ struct Sequence_Selector_Pointer_Compare {
2228
+ bool operator () (const Sequence_Selector * const pLeft, const Sequence_Selector * const pRight) const ;
2229
2229
};
2230
2230
2231
2231
// //////////////////////////////////////////////////////////////////////////
2232
2232
// Simple selector sequences. Maintains flags indicating whether it contains
2233
2233
// any parent references or placeholders, to simplify expansion.
2234
2234
// //////////////////////////////////////////////////////////////////////////
2235
- typedef std::set<Complex_Selector *, Complex_Selector_Pointer_Compare > SourcesSet;
2235
+ typedef std::set<Sequence_Selector *, Sequence_Selector_Pointer_Compare > SourcesSet;
2236
2236
class Compound_Selector : public Selector , public Vectorized <Simple_Selector*> {
2237
2237
private:
2238
2238
SourcesSet sources_;
@@ -2263,7 +2263,7 @@ namespace Sass {
2263
2263
return length () == 1 && (*this )[0 ]->is_universal ();
2264
2264
}
2265
2265
2266
- Complex_Selector * to_complex (Memory_Manager& mem);
2266
+ Sequence_Selector * to_complex (Memory_Manager& mem);
2267
2267
Compound_Selector* unify_with (Compound_Selector* rhs, Context& ctx);
2268
2268
// virtual Placeholder_Selector* find_placeholder();
2269
2269
virtual bool has_parent_ref ();
@@ -2280,7 +2280,7 @@ namespace Sass {
2280
2280
return 0 ;
2281
2281
}
2282
2282
virtual bool is_superselector_of (Compound_Selector* sub, std::string wrapped = " " );
2283
- virtual bool is_superselector_of (Complex_Selector * sub, std::string wrapped = " " );
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 ()
2286
2286
{
@@ -2334,24 +2334,24 @@ namespace Sass {
2334
2334
// CSS selector combinators (">", "+", "~", and whitespace). Essentially a
2335
2335
// linked list.
2336
2336
// //////////////////////////////////////////////////////////////////////////
2337
- class Complex_Selector : public Selector {
2337
+ class Sequence_Selector : public Selector {
2338
2338
public:
2339
2339
enum Combinator { ANCESTOR_OF, PARENT_OF, PRECEDES, ADJACENT_TO, REFERENCE };
2340
2340
private:
2341
2341
ADD_PROPERTY (Combinator, combinator)
2342
2342
ADD_PROPERTY (Compound_Selector*, head)
2343
- ADD_PROPERTY (Complex_Selector *, tail)
2343
+ ADD_PROPERTY (Sequence_Selector *, tail)
2344
2344
ADD_PROPERTY (String*, reference);
2345
2345
public:
2346
2346
bool contains_placeholder () {
2347
2347
if (head () && head ()->contains_placeholder ()) return true ;
2348
2348
if (tail () && tail ()->contains_placeholder ()) return true ;
2349
2349
return false ;
2350
2350
};
2351
- Complex_Selector (ParserState pstate,
2351
+ Sequence_Selector (ParserState pstate,
2352
2352
Combinator c = ANCESTOR_OF,
2353
2353
Compound_Selector* h = 0 ,
2354
- Complex_Selector * t = 0 ,
2354
+ Sequence_Selector * t = 0 ,
2355
2355
String* r = 0 )
2356
2356
: Selector(pstate),
2357
2357
combinator_ (c),
@@ -2363,7 +2363,7 @@ namespace Sass {
2363
2363
}
2364
2364
virtual bool has_parent_ref ();
2365
2365
2366
- Complex_Selector * skip_empty_reference ()
2366
+ Sequence_Selector * skip_empty_reference ()
2367
2367
{
2368
2368
if ((!head_ || !head_->length () || head_->is_empty_reference ()) &&
2369
2369
combinator () == Combinator::ANCESTOR_OF)
@@ -2383,36 +2383,36 @@ namespace Sass {
2383
2383
combinator () == Combinator::ANCESTOR_OF;
2384
2384
}
2385
2385
2386
- Complex_Selector * context (Context&);
2386
+ Sequence_Selector * context (Context&);
2387
2387
2388
2388
2389
2389
// front returns the first real tail
2390
2390
// skips over parent and empty ones
2391
- const Complex_Selector * first () const ;
2391
+ const Sequence_Selector * first () const ;
2392
2392
2393
2393
// last returns the last real tail
2394
- const Complex_Selector * last () const ;
2394
+ const Sequence_Selector * last () const ;
2395
2395
2396
2396
CommaSequence_Selector* tails (Context& ctx, CommaSequence_Selector* tails);
2397
2397
2398
2398
// unconstant accessors
2399
- Complex_Selector * first ();
2400
- Complex_Selector * last ();
2399
+ Sequence_Selector * first ();
2400
+ Sequence_Selector * last ();
2401
2401
2402
2402
// some shortcuts that should be removed
2403
- const Complex_Selector * innermost () const { return last (); };
2404
- Complex_Selector * innermost () { return last (); };
2403
+ const Sequence_Selector * innermost () const { return last (); };
2404
+ Sequence_Selector * innermost () { return last (); };
2405
2405
2406
2406
size_t length () const ;
2407
2407
CommaSequence_Selector* resolve_parent_refs (Context& ctx, CommaSequence_Selector* parents, bool implicit_parent);
2408
2408
virtual bool is_superselector_of (Compound_Selector* sub, std::string wrapping = " " );
2409
- virtual bool is_superselector_of (Complex_Selector * sub, std::string wrapping = " " );
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();
2412
- CommaSequence_Selector* unify_with (Complex_Selector * rhs, Context& ctx);
2412
+ CommaSequence_Selector* unify_with (Sequence_Selector * rhs, Context& ctx);
2413
2413
Combinator clear_innermost ();
2414
- void append (Context&, Complex_Selector *);
2415
- void set_innermost (Complex_Selector *, Combinator);
2414
+ void append (Context&, Sequence_Selector *);
2415
+ void set_innermost (Sequence_Selector *, Combinator);
2416
2416
virtual size_t hash ()
2417
2417
{
2418
2418
if (hash_ == 0 ) {
@@ -2440,9 +2440,9 @@ namespace Sass {
2440
2440
if (tail_ && tail_->has_wrapped_selector ()) return true ;
2441
2441
return false ;
2442
2442
}
2443
- bool operator <(const Complex_Selector & rhs) const ;
2444
- bool operator ==(const Complex_Selector & rhs) const ;
2445
- inline bool operator !=(const Complex_Selector & rhs) const { return !(*this == rhs); }
2443
+ bool operator <(const Sequence_Selector & rhs) const ;
2444
+ bool operator ==(const Sequence_Selector & rhs) const ;
2445
+ inline bool operator !=(const Sequence_Selector & rhs) const { return !(*this == rhs); }
2446
2446
SourcesSet sources ()
2447
2447
{
2448
2448
// s = Set.new
@@ -2452,7 +2452,7 @@ namespace Sass {
2452
2452
SourcesSet srcs;
2453
2453
2454
2454
Compound_Selector* pHead = head ();
2455
- Complex_Selector * pTail = tail ();
2455
+ Sequence_Selector * pTail = tail ();
2456
2456
2457
2457
if (pHead) {
2458
2458
SourcesSet& headSources = pHead->sources ();
@@ -2468,7 +2468,7 @@ namespace Sass {
2468
2468
}
2469
2469
void addSources (SourcesSet& sources, Context& ctx) {
2470
2470
// members.map! {|m| m.is_a?(SimpleSequence) ? m.with_more_sources(sources) : m}
2471
- Complex_Selector * pIter = this ;
2471
+ Sequence_Selector * pIter = this ;
2472
2472
while (pIter) {
2473
2473
Compound_Selector* pHead = pIter->head ();
2474
2474
@@ -2480,7 +2480,7 @@ namespace Sass {
2480
2480
}
2481
2481
}
2482
2482
void clearSources () {
2483
- Complex_Selector * pIter = this ;
2483
+ Sequence_Selector * pIter = this ;
2484
2484
while (pIter) {
2485
2485
Compound_Selector* pHead = pIter->head ();
2486
2486
@@ -2491,25 +2491,25 @@ namespace Sass {
2491
2491
pIter = pIter->tail ();
2492
2492
}
2493
2493
}
2494
- Complex_Selector * clone (Context&) const ; // does not clone Compound_Selector*s
2495
- Complex_Selector * cloneFully (Context&) const ; // clones Compound_Selector*s
2494
+ Sequence_Selector * clone (Context&) const ; // does not clone Compound_Selector*s
2495
+ Sequence_Selector * cloneFully (Context&) const ; // clones Compound_Selector*s
2496
2496
// std::vector<Compound_Selector*> to_vector();
2497
2497
ATTACH_OPERATIONS ()
2498
2498
};
2499
2499
2500
- typedef std::deque<Complex_Selector *> ComplexSelectorDeque;
2501
- typedef Subset_Map<std::string, std::pair<Complex_Selector *, Compound_Selector*> > ExtensionSubsetMap;
2500
+ typedef std::deque<Sequence_Selector *> ComplexSelectorDeque;
2501
+ typedef Subset_Map<std::string, std::pair<Sequence_Selector *, Compound_Selector*> > ExtensionSubsetMap;
2502
2502
2503
2503
// /////////////////////////////////
2504
2504
// Comma-separated selector groups.
2505
2505
// /////////////////////////////////
2506
- class CommaSequence_Selector : public Selector , public Vectorized <Complex_Selector *> {
2506
+ class CommaSequence_Selector : public Selector , public Vectorized <Sequence_Selector *> {
2507
2507
ADD_PROPERTY (std::vector<std::string>, wspace)
2508
2508
protected:
2509
- void adjust_after_pushing (Complex_Selector * c);
2509
+ void adjust_after_pushing (Sequence_Selector * c);
2510
2510
public:
2511
2511
CommaSequence_Selector (ParserState pstate, size_t s = 0 )
2512
- : Selector(pstate), Vectorized<Complex_Selector *>(s), wspace_(0 )
2512
+ : Selector(pstate), Vectorized<Sequence_Selector *>(s), wspace_(0 )
2513
2513
{ }
2514
2514
std::string type () { return " list" ; }
2515
2515
// remove parent selector references
@@ -2519,7 +2519,7 @@ namespace Sass {
2519
2519
// virtual Placeholder_Selector* find_placeholder();
2520
2520
CommaSequence_Selector* resolve_parent_refs (Context& ctx, CommaSequence_Selector* parents, bool implicit_parent = true );
2521
2521
virtual bool is_superselector_of (Compound_Selector* sub, std::string wrapping = " " );
2522
- virtual bool is_superselector_of (Complex_Selector * sub, std::string wrapping = " " );
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&);
2525
2525
void populate_extends (CommaSequence_Selector*, Context&, ExtensionSubsetMap&);
@@ -2544,12 +2544,12 @@ namespace Sass {
2544
2544
}
2545
2545
virtual void set_media_block (Media_Block* mb) {
2546
2546
media_block (mb);
2547
- for (Complex_Selector * cs : elements ()) {
2547
+ for (Sequence_Selector * cs : elements ()) {
2548
2548
cs->set_media_block (mb);
2549
2549
}
2550
2550
}
2551
2551
virtual bool has_wrapped_selector () {
2552
- for (Complex_Selector * cs : elements ()) {
2552
+ for (Sequence_Selector * cs : elements ()) {
2553
2553
if (cs->has_wrapped_selector ()) return true ;
2554
2554
}
2555
2555
return false ;
@@ -2573,7 +2573,7 @@ namespace Sass {
2573
2573
// members of a SimpleSequence (Compound_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 Complex_Selector objects.
2576
+ // use with Compound_Selector and Sequence_Selector objects.
2577
2577
if (simpleSelectorOrderDependent) {
2578
2578
return !(one < two) && !(two < one);
2579
2579
} else {
@@ -2582,7 +2582,7 @@ namespace Sass {
2582
2582
}
2583
2583
2584
2584
// compare function for sorting and probably other other uses
2585
- struct cmp_complex_selector { inline bool operator () (const Complex_Selector * l, const Complex_Selector * r) { return (*l < *r); } };
2585
+ struct cmp_complex_selector { inline bool operator () (const Sequence_Selector * l, const Sequence_Selector * r) { return (*l < *r); } };
2586
2586
struct cmp_compound_selector { inline bool operator () (const Compound_Selector* l, const Compound_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
0 commit comments