-
Notifications
You must be signed in to change notification settings - Fork 464
/
Copy pathextend.hpp
45 lines (31 loc) · 882 Bytes
/
extend.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef SASS_EXTEND_H
#define SASS_EXTEND_H
#include <map>
#include <set>
#include <vector>
#include <iostream>
#include "ast.hpp"
#include "operation.hpp"
#include "subset_map.hpp"
namespace Sass {
using namespace std;
class Context;
typedef Subset_Map<string, pair<Complex_Selector*, Compound_Selector*> > ExtensionSubsetMap;
class Extend : public Operation_CRTP<void, Extend> {
Context& ctx;
ExtensionSubsetMap& subset_map;
void fallback_impl(AST_Node* n) { };
public:
Extend(Context&, ExtensionSubsetMap&);
virtual ~Extend() { }
using Operation<void>::operator();
void operator()(Block*);
void operator()(Ruleset*);
void operator()(Feature_Block*);
void operator()(Media_Block*);
void operator()(At_Rule*);
template <typename U>
void fallback(U x) { return fallback_impl(x); }
};
}
#endif