This repository has been archived by the owner on Mar 13, 2021. It is now read-only.
forked from sass/libsass
-
Notifications
You must be signed in to change notification settings - Fork 1
/
contextualize.hpp
65 lines (55 loc) · 1.75 KB
/
contextualize.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#define SASS_CONTEXTUALIZE
#ifndef SASS_ENVIRONMENT
#include "environment.hpp"
#endif
#ifndef SASS_OPERATION
#include "operation.hpp"
#endif
namespace Sass {
class AST_Node;
class Selector;
class Selector_Schema;
class Selector_Group;
class Selector_Combination;
class Simple_Selector_Sequence;
class Negated_Selector;
class Pseudo_Selector;
class Attribute_Selector;
class Selector_Qualifier;
class Type_Selector;
class Selector_Placeholder;
class Selector_Reference;
class Simple_Selector;
class Context;
class Eval;
class Backtrace;
typedef Environment<AST_Node*> Env;
class Contextualize : public Operation_CRTP<Selector*, Contextualize> {
Context& ctx;
Eval* eval;
Env* env;
Selector* parent;
Backtrace* backtrace;
Selector* fallback_impl(AST_Node* n);
public:
Selector* placeholder;
Selector* extender;
Contextualize(Context&, Eval*, Env*, Backtrace*, Selector* placeholder = 0, Selector* extender = 0);
virtual ~Contextualize();
Contextualize* with(Selector*, Env*, Backtrace*, Selector* placeholder = 0, Selector* extender = 0);
using Operation<Selector*>::operator();
Selector* operator()(Selector_Schema*);
Selector* operator()(Selector_Group*);
Selector* operator()(Selector_Combination*);
Selector* operator()(Simple_Selector_Sequence*);
Selector* operator()(Negated_Selector*);
Selector* operator()(Pseudo_Selector*);
Selector* operator()(Attribute_Selector*);
Selector* operator()(Selector_Qualifier*);
Selector* operator()(Type_Selector*);
Selector* operator()(Selector_Placeholder*);
Selector* operator()(Selector_Reference*);
template <typename U>
Selector* fallback(U x) { return fallback_impl(x); }
};
}