sassc 1.11.1 → 1.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/README.md +3 -2
- data/ext/libsass/Makefile.conf +2 -1
- data/ext/libsass/appveyor.yml +10 -5
- data/ext/libsass/docs/dev-ast-memory.md +223 -0
- data/ext/libsass/include/sass/base.h +2 -0
- data/ext/libsass/script/bootstrap +7 -4
- data/ext/libsass/script/ci-build-libsass +3 -3
- data/ext/libsass/script/ci-install-compiler +2 -0
- data/ext/libsass/script/ci-report-coverage +2 -1
- data/ext/libsass/script/test-leaks.pl +103 -0
- data/ext/libsass/src/ast.cpp +621 -495
- data/ext/libsass/src/ast.hpp +801 -367
- data/ext/libsass/src/ast_def_macros.hpp +5 -5
- data/ext/libsass/src/ast_fwd_decl.hpp +312 -14
- data/ext/libsass/src/bind.cpp +54 -51
- data/ext/libsass/src/bind.hpp +3 -7
- data/ext/libsass/src/check_nesting.cpp +117 -120
- data/ext/libsass/src/check_nesting.hpp +38 -34
- data/ext/libsass/src/color_maps.cpp +3 -3
- data/ext/libsass/src/color_maps.hpp +3 -3
- data/ext/libsass/src/context.cpp +33 -34
- data/ext/libsass/src/context.hpp +12 -14
- data/ext/libsass/src/cssize.cpp +200 -228
- data/ext/libsass/src/cssize.hpp +49 -49
- data/ext/libsass/src/debugger.hpp +260 -241
- data/ext/libsass/src/emitter.cpp +6 -6
- data/ext/libsass/src/emitter.hpp +7 -7
- data/ext/libsass/src/environment.cpp +2 -2
- data/ext/libsass/src/environment.hpp +0 -2
- data/ext/libsass/src/error_handling.cpp +5 -5
- data/ext/libsass/src/error_handling.hpp +12 -12
- data/ext/libsass/src/eval.cpp +412 -401
- data/ext/libsass/src/eval.hpp +61 -62
- data/ext/libsass/src/expand.cpp +223 -204
- data/ext/libsass/src/expand.hpp +42 -42
- data/ext/libsass/src/extend.cpp +198 -201
- data/ext/libsass/src/extend.hpp +12 -14
- data/ext/libsass/src/file.hpp +4 -5
- data/ext/libsass/src/functions.cpp +413 -418
- data/ext/libsass/src/functions.hpp +7 -10
- data/ext/libsass/src/inspect.cpp +115 -109
- data/ext/libsass/src/inspect.hpp +69 -69
- data/ext/libsass/src/listize.cpp +31 -33
- data/ext/libsass/src/listize.hpp +8 -10
- data/ext/libsass/src/memory/SharedPtr.cpp +116 -0
- data/ext/libsass/src/memory/SharedPtr.hpp +202 -0
- data/ext/libsass/src/node.cpp +45 -43
- data/ext/libsass/src/node.hpp +15 -15
- data/ext/libsass/src/operation.hpp +136 -136
- data/ext/libsass/src/output.cpp +48 -49
- data/ext/libsass/src/output.hpp +14 -14
- data/ext/libsass/src/parser.cpp +530 -554
- data/ext/libsass/src/parser.hpp +91 -96
- data/ext/libsass/src/prelexer.cpp +13 -10
- data/ext/libsass/src/remove_placeholders.cpp +25 -21
- data/ext/libsass/src/remove_placeholders.hpp +7 -7
- data/ext/libsass/src/sass2scss.cpp +2 -1
- data/ext/libsass/src/sass_context.cpp +125 -107
- data/ext/libsass/src/sass_context.hpp +1 -1
- data/ext/libsass/src/sass_util.hpp +5 -5
- data/ext/libsass/src/sass_values.cpp +27 -27
- data/ext/libsass/src/source_map.cpp +2 -2
- data/ext/libsass/src/source_map.hpp +2 -2
- data/ext/libsass/src/subset_map.cpp +57 -0
- data/ext/libsass/src/subset_map.hpp +8 -76
- data/ext/libsass/src/to_c.cpp +13 -13
- data/ext/libsass/src/to_c.hpp +14 -14
- data/ext/libsass/src/to_value.cpp +20 -20
- data/ext/libsass/src/to_value.hpp +20 -21
- data/ext/libsass/src/util.cpp +55 -88
- data/ext/libsass/src/util.hpp +9 -13
- data/ext/libsass/src/values.cpp +27 -26
- data/ext/libsass/src/values.hpp +2 -2
- data/ext/libsass/test/test_subset_map.cpp +69 -69
- data/ext/libsass/win/libsass.targets +3 -2
- data/ext/libsass/win/libsass.vcxproj.filters +9 -6
- data/lib/sassc/version.rb +1 -1
- data/sassc.gemspec +0 -1
- data/test/native_test.rb +1 -1
- metadata +7 -5
- data/ext/libsass/src/ast_factory.hpp +0 -92
- data/ext/libsass/src/memory_manager.cpp +0 -77
- data/ext/libsass/src/memory_manager.hpp +0 -48
data/ext/libsass/src/node.cpp
CHANGED
@@ -8,20 +8,20 @@
|
|
8
8
|
namespace Sass {
|
9
9
|
|
10
10
|
|
11
|
-
Node Node::createCombinator(const
|
11
|
+
Node Node::createCombinator(const Complex_Selector::Combinator& combinator) {
|
12
12
|
NodeDequePtr null;
|
13
13
|
return Node(COMBINATOR, combinator, NULL /*pSelector*/, null /*pCollection*/);
|
14
14
|
}
|
15
15
|
|
16
16
|
|
17
|
-
Node Node::createSelector(
|
17
|
+
Node Node::createSelector(Complex_Selector_Ptr pSelector, Context& ctx) {
|
18
18
|
NodeDequePtr null;
|
19
19
|
|
20
|
-
|
20
|
+
Complex_Selector_Ptr pStripped = SASS_MEMORY_COPY(pSelector);
|
21
21
|
pStripped->tail(NULL);
|
22
|
-
pStripped->combinator(
|
22
|
+
pStripped->combinator(Complex_Selector::ANCESTOR_OF);
|
23
23
|
|
24
|
-
Node n(SELECTOR,
|
24
|
+
Node n(SELECTOR, Complex_Selector::ANCESTOR_OF, pStripped, null /*pCollection*/);
|
25
25
|
if (pSelector) n.got_line_feed = pSelector->has_line_feed();
|
26
26
|
return n;
|
27
27
|
}
|
@@ -29,37 +29,37 @@ namespace Sass {
|
|
29
29
|
|
30
30
|
Node Node::createCollection() {
|
31
31
|
NodeDequePtr pEmptyCollection = std::make_shared<NodeDeque>();
|
32
|
-
return Node(COLLECTION,
|
32
|
+
return Node(COLLECTION, Complex_Selector::ANCESTOR_OF, NULL /*pSelector*/, pEmptyCollection);
|
33
33
|
}
|
34
34
|
|
35
35
|
|
36
36
|
Node Node::createCollection(const NodeDeque& values) {
|
37
37
|
NodeDequePtr pShallowCopiedCollection = std::make_shared<NodeDeque>(values);
|
38
|
-
return Node(COLLECTION,
|
38
|
+
return Node(COLLECTION, Complex_Selector::ANCESTOR_OF, NULL /*pSelector*/, pShallowCopiedCollection);
|
39
39
|
}
|
40
40
|
|
41
41
|
|
42
42
|
Node Node::createNil() {
|
43
43
|
NodeDequePtr null;
|
44
|
-
return Node(NIL,
|
44
|
+
return Node(NIL, Complex_Selector::ANCESTOR_OF, NULL /*pSelector*/, null /*pCollection*/);
|
45
45
|
}
|
46
46
|
|
47
47
|
|
48
|
-
Node::Node(const TYPE& type,
|
48
|
+
Node::Node(const TYPE& type, Complex_Selector::Combinator combinator, Complex_Selector_Ptr pSelector, NodeDequePtr& pCollection)
|
49
49
|
: got_line_feed(false), mType(type), mCombinator(combinator), mpSelector(pSelector), mpCollection(pCollection)
|
50
50
|
{ if (pSelector) got_line_feed = pSelector->has_line_feed(); }
|
51
51
|
|
52
52
|
|
53
|
-
Node Node::
|
53
|
+
Node Node::klone(Context& ctx) const {
|
54
54
|
NodeDequePtr pNewCollection = std::make_shared<NodeDeque>();
|
55
55
|
if (mpCollection) {
|
56
56
|
for (NodeDeque::iterator iter = mpCollection->begin(), iterEnd = mpCollection->end(); iter != iterEnd; iter++) {
|
57
57
|
Node& toClone = *iter;
|
58
|
-
pNewCollection->push_back(toClone.
|
58
|
+
pNewCollection->push_back(toClone.klone(ctx));
|
59
59
|
}
|
60
60
|
}
|
61
61
|
|
62
|
-
Node n(mType, mCombinator, mpSelector ? mpSelector
|
62
|
+
Node n(mType, mCombinator, mpSelector ? SASS_MEMORY_COPY(mpSelector) : NULL, pNewCollection);
|
63
63
|
n.got_line_feed = got_line_feed;
|
64
64
|
return n;
|
65
65
|
}
|
@@ -101,7 +101,7 @@ namespace Sass {
|
|
101
101
|
|
102
102
|
} else if (lhs.isSelector()){
|
103
103
|
|
104
|
-
return selectors_equal(
|
104
|
+
return selectors_equal(*&lhs.selector(), *&rhs.selector(), simpleSelectorOrderDependent);
|
105
105
|
|
106
106
|
} else if (lhs.isCollection()) {
|
107
107
|
|
@@ -140,11 +140,11 @@ namespace Sass {
|
|
140
140
|
if (node.isCombinator()) {
|
141
141
|
|
142
142
|
switch (node.combinator()) {
|
143
|
-
case
|
144
|
-
case
|
145
|
-
case
|
146
|
-
case
|
147
|
-
case
|
143
|
+
case Complex_Selector::ANCESTOR_OF: os << "\" \""; break;
|
144
|
+
case Complex_Selector::PARENT_OF: os << "\">\""; break;
|
145
|
+
case Complex_Selector::PRECEDES: os << "\"~\""; break;
|
146
|
+
case Complex_Selector::ADJACENT_TO: os << "\"+\""; break;
|
147
|
+
case Complex_Selector::REFERENCE: os << "\"/\""; break;
|
148
148
|
}
|
149
149
|
|
150
150
|
} else if (node.isNil()) {
|
@@ -177,7 +177,7 @@ namespace Sass {
|
|
177
177
|
#endif
|
178
178
|
|
179
179
|
|
180
|
-
Node complexSelectorToNode(
|
180
|
+
Node complexSelectorToNode(Complex_Selector_Ptr pToConvert, Context& ctx) {
|
181
181
|
if (pToConvert == NULL) {
|
182
182
|
return Node::createNil();
|
183
183
|
}
|
@@ -187,26 +187,26 @@ namespace Sass {
|
|
187
187
|
|
188
188
|
// unwrap the selector from parent ref
|
189
189
|
if (pToConvert->head() && pToConvert->head()->has_parent_ref()) {
|
190
|
-
|
190
|
+
Complex_Selector_Obj tail = pToConvert->tail();
|
191
191
|
if (tail) tail->has_line_feed(pToConvert->has_line_feed());
|
192
|
-
pToConvert = tail;
|
192
|
+
pToConvert = &tail;
|
193
193
|
}
|
194
194
|
|
195
195
|
while (pToConvert) {
|
196
196
|
|
197
197
|
bool empty_parent_ref = pToConvert->head() && pToConvert->head()->is_empty_reference();
|
198
198
|
|
199
|
-
if (pToConvert->head()
|
199
|
+
if (pToConvert->head() || empty_parent_ref) {
|
200
200
|
}
|
201
201
|
|
202
|
-
// the first
|
203
|
-
if (pToConvert->head()
|
202
|
+
// the first Complex_Selector may contain a dummy head pointer, skip it.
|
203
|
+
if (pToConvert->head() && !empty_parent_ref) {
|
204
204
|
node.collection()->push_back(Node::createSelector(pToConvert, ctx));
|
205
205
|
if (has_lf) node.collection()->back().got_line_feed = has_lf;
|
206
206
|
has_lf = false;
|
207
207
|
}
|
208
208
|
|
209
|
-
if (pToConvert->combinator() !=
|
209
|
+
if (pToConvert->combinator() != Complex_Selector::ANCESTOR_OF) {
|
210
210
|
node.collection()->push_back(Node::createCombinator(pToConvert->combinator()));
|
211
211
|
if (has_lf) node.collection()->back().got_line_feed = has_lf;
|
212
212
|
has_lf = false;
|
@@ -216,21 +216,21 @@ namespace Sass {
|
|
216
216
|
// pToConvert->tail()->has_line_feed(pToConvert->has_line_feed());
|
217
217
|
}
|
218
218
|
|
219
|
-
pToConvert = pToConvert->tail();
|
219
|
+
pToConvert = &pToConvert->tail();
|
220
220
|
}
|
221
221
|
|
222
222
|
return node;
|
223
223
|
}
|
224
224
|
|
225
225
|
|
226
|
-
|
226
|
+
Complex_Selector_Ptr nodeToComplexSelector(const Node& toConvert, Context& ctx) {
|
227
227
|
if (toConvert.isNil()) {
|
228
228
|
return NULL;
|
229
229
|
}
|
230
230
|
|
231
231
|
|
232
232
|
if (!toConvert.isCollection()) {
|
233
|
-
throw "The node to convert to a
|
233
|
+
throw "The node to convert to a Complex_Selector_Ptr must be a collection type or nil.";
|
234
234
|
}
|
235
235
|
|
236
236
|
|
@@ -238,9 +238,9 @@ namespace Sass {
|
|
238
238
|
|
239
239
|
std::string noPath("");
|
240
240
|
Position noPosition(-1, -1, -1);
|
241
|
-
|
241
|
+
Complex_Selector_Obj pFirst = SASS_MEMORY_NEW(Complex_Selector, ParserState("[NODE]"), Complex_Selector::ANCESTOR_OF, NULL, NULL);
|
242
242
|
|
243
|
-
|
243
|
+
Complex_Selector_Obj pCurrent = pFirst;
|
244
244
|
|
245
245
|
if (toConvert.isSelector()) pFirst->has_line_feed(toConvert.got_line_feed);
|
246
246
|
if (toConvert.isCombinator()) pFirst->has_line_feed(toConvert.got_line_feed);
|
@@ -250,20 +250,22 @@ namespace Sass {
|
|
250
250
|
Node& child = *childIter;
|
251
251
|
|
252
252
|
if (child.isSelector()) {
|
253
|
-
|
253
|
+
// JMA - need to clone the selector, because they can end up getting shared across Node
|
254
|
+
// collections, and can result in an infinite loop during the call to parentSuperselector()
|
255
|
+
pCurrent->tail(SASS_MEMORY_COPY(child.selector()));
|
254
256
|
// if (child.got_line_feed) pCurrent->has_line_feed(child.got_line_feed);
|
255
|
-
pCurrent = pCurrent->tail();
|
257
|
+
pCurrent = &pCurrent->tail();
|
256
258
|
} else if (child.isCombinator()) {
|
257
259
|
pCurrent->combinator(child.combinator());
|
258
260
|
if (child.got_line_feed) pCurrent->has_line_feed(child.got_line_feed);
|
259
261
|
|
260
|
-
// if the next node is also a combinator, create another
|
262
|
+
// if the next node is also a combinator, create another Complex_Selector to hold it so it doesn't replace the current combinator
|
261
263
|
if (childIter+1 != childIterEnd) {
|
262
264
|
Node& nextNode = *(childIter+1);
|
263
265
|
if (nextNode.isCombinator()) {
|
264
|
-
pCurrent->tail(SASS_MEMORY_NEW(
|
266
|
+
pCurrent->tail(SASS_MEMORY_NEW(Complex_Selector, ParserState("[NODE]"), Complex_Selector::ANCESTOR_OF, NULL, NULL));
|
265
267
|
if (nextNode.got_line_feed) pCurrent->tail()->has_line_feed(nextNode.got_line_feed);
|
266
|
-
pCurrent = pCurrent->tail();
|
268
|
+
pCurrent = &pCurrent->tail();
|
267
269
|
}
|
268
270
|
}
|
269
271
|
} else {
|
@@ -271,22 +273,22 @@ namespace Sass {
|
|
271
273
|
}
|
272
274
|
}
|
273
275
|
|
274
|
-
// Put the dummy
|
275
|
-
|
276
|
-
|
276
|
+
// Put the dummy Compound_Selector in the first position, for consistency with the rest of libsass
|
277
|
+
Compound_Selector_Ptr fakeHead = SASS_MEMORY_NEW(Compound_Selector, ParserState("[NODE]"), 1);
|
278
|
+
Parent_Selector_Ptr selectorRef = SASS_MEMORY_NEW(Parent_Selector, ParserState("[NODE]"));
|
277
279
|
fakeHead->elements().push_back(selectorRef);
|
278
280
|
if (toConvert.got_line_feed) pFirst->has_line_feed(toConvert.got_line_feed);
|
279
281
|
// pFirst->has_line_feed(pFirst->has_line_feed() || pFirst->tail()->has_line_feed() || toConvert.got_line_feed);
|
280
282
|
pFirst->head(fakeHead);
|
281
|
-
return pFirst;
|
283
|
+
return SASS_MEMORY_COPY(pFirst);
|
282
284
|
}
|
283
285
|
|
284
286
|
// A very naive trim function, which removes duplicates in a node
|
285
|
-
// This is only used in
|
287
|
+
// This is only used in Complex_Selector::unify_with for now, may need modifications to fit other needs
|
286
288
|
Node Node::naiveTrim(Node& seqses, Context& ctx) {
|
287
289
|
|
288
290
|
std::vector<Node*> res;
|
289
|
-
std::vector<
|
291
|
+
std::vector<Complex_Selector_Obj> known;
|
290
292
|
|
291
293
|
NodeDeque::reverse_iterator seqsesIter = seqses.collection()->rbegin(),
|
292
294
|
seqsesIterEnd = seqses.collection()->rend();
|
@@ -295,8 +297,8 @@ namespace Sass {
|
|
295
297
|
{
|
296
298
|
Node& seqs1 = *seqsesIter;
|
297
299
|
if( seqs1.isSelector() ) {
|
298
|
-
|
299
|
-
std::vector<
|
300
|
+
Complex_Selector_Obj sel = seqs1.selector();
|
301
|
+
std::vector<Complex_Selector_Obj>::iterator it;
|
300
302
|
bool found = false;
|
301
303
|
for (it = known.begin(); it != known.end(); ++it) {
|
302
304
|
if (**it == *sel) { found = true; break; }
|
data/ext/libsass/src/node.hpp
CHANGED
@@ -17,7 +17,7 @@ namespace Sass {
|
|
17
17
|
/*
|
18
18
|
There are a lot of stumbling blocks when trying to port the ruby extend code to C++. The biggest is the choice of
|
19
19
|
data type. The ruby code will pretty seamlessly switch types between an Array<SimpleSequence or Op> (libsass'
|
20
|
-
equivalent is the
|
20
|
+
equivalent is the Complex_Selector) to a Sequence, which contains more metadata about the sequence than just the
|
21
21
|
selector info. They also have the ability to have arbitrary nestings of arrays like [1, [2]], which is hard to
|
22
22
|
implement using Array equivalents in C++ (like the deque or vector). They also have the ability to include nil
|
23
23
|
in the arrays, like [1, nil, 3], which has potential semantic differences than an empty array [1, [], 3]. To be
|
@@ -26,7 +26,7 @@ namespace Sass {
|
|
26
26
|
more closely match the ruby code, which is a huge benefit when attempting to implement an complex algorithm like
|
27
27
|
the Extend operator.
|
28
28
|
|
29
|
-
Note that the current libsass data model also pairs the combinator with the
|
29
|
+
Note that the current libsass data model also pairs the combinator with the Complex_Selector that follows it, but
|
30
30
|
ruby sass has no such restriction, so we attempt to create a data structure that can handle them split apart.
|
31
31
|
*/
|
32
32
|
|
@@ -50,18 +50,18 @@ namespace Sass {
|
|
50
50
|
bool isNil() const { return mType == NIL; }
|
51
51
|
bool got_line_feed;
|
52
52
|
|
53
|
-
|
53
|
+
Complex_Selector::Combinator combinator() const { return mCombinator; }
|
54
54
|
|
55
|
-
|
56
|
-
|
55
|
+
Complex_Selector_Obj selector() { return mpSelector; }
|
56
|
+
Complex_Selector_Obj selector() const { return mpSelector; }
|
57
57
|
|
58
58
|
NodeDequePtr collection() { return mpCollection; }
|
59
59
|
const NodeDequePtr collection() const { return mpCollection; }
|
60
60
|
|
61
|
-
static Node createCombinator(const
|
61
|
+
static Node createCombinator(const Complex_Selector::Combinator& combinator);
|
62
62
|
|
63
|
-
// This method will
|
64
|
-
static Node createSelector(
|
63
|
+
// This method will klone the selector, stripping off the tail and combinator
|
64
|
+
static Node createSelector(Complex_Selector_Ptr pSelector, Context& ctx);
|
65
65
|
|
66
66
|
static Node createCollection();
|
67
67
|
static Node createCollection(const NodeDeque& values);
|
@@ -69,7 +69,7 @@ namespace Sass {
|
|
69
69
|
static Node createNil();
|
70
70
|
static Node naiveTrim(Node& seqses, Context& ctx);
|
71
71
|
|
72
|
-
Node
|
72
|
+
Node klone(Context& ctx) const;
|
73
73
|
|
74
74
|
bool operator==(const Node& rhs) const;
|
75
75
|
inline bool operator!=(const Node& rhs) const { return !(*this == rhs); }
|
@@ -79,7 +79,7 @@ namespace Sass {
|
|
79
79
|
COLLECTION FUNCTIONS
|
80
80
|
|
81
81
|
Most types don't need any helper methods (nil and combinator due to their simplicity and
|
82
|
-
selector due to the fact that we leverage the non-node selector code on the
|
82
|
+
selector due to the fact that we leverage the non-node selector code on the Complex_Selector
|
83
83
|
whereever possible). The following methods are intended to be called on Node objects whose
|
84
84
|
type is COLLECTION only.
|
85
85
|
*/
|
@@ -97,21 +97,21 @@ namespace Sass {
|
|
97
97
|
// Private constructor; Use the static methods (like createCombinator and createSelector)
|
98
98
|
// to instantiate this object. This is more expressive, and it allows us to break apart each
|
99
99
|
// case into separate functions.
|
100
|
-
Node(const TYPE& type,
|
100
|
+
Node(const TYPE& type, Complex_Selector::Combinator combinator, Complex_Selector_Ptr pSelector, NodeDequePtr& pCollection);
|
101
101
|
|
102
102
|
TYPE mType;
|
103
103
|
|
104
104
|
// TODO: can we union these to save on memory?
|
105
|
-
|
106
|
-
|
105
|
+
Complex_Selector::Combinator mCombinator;
|
106
|
+
Complex_Selector_Obj mpSelector;
|
107
107
|
NodeDequePtr mpCollection;
|
108
108
|
};
|
109
109
|
|
110
110
|
#ifdef DEBUG
|
111
111
|
std::ostream& operator<<(std::ostream& os, const Node& node);
|
112
112
|
#endif
|
113
|
-
Node complexSelectorToNode(
|
114
|
-
|
113
|
+
Node complexSelectorToNode(Complex_Selector_Ptr pToConvert, Context& ctx);
|
114
|
+
Complex_Selector_Ptr nodeToComplexSelector(const Node& toConvert, Context& ctx);
|
115
115
|
|
116
116
|
bool nodesEqual(const Node& one, const Node& two, bool simpleSelectorOrderDependent);
|
117
117
|
|
@@ -8,79 +8,79 @@ namespace Sass {
|
|
8
8
|
template<typename T>
|
9
9
|
class Operation {
|
10
10
|
public:
|
11
|
-
virtual T operator()(
|
11
|
+
virtual T operator()(AST_Node_Ptr x) = 0;
|
12
12
|
virtual ~Operation() { }
|
13
13
|
// statements
|
14
|
-
virtual T operator()(
|
15
|
-
virtual T operator()(
|
16
|
-
virtual T operator()(
|
17
|
-
virtual T operator()(
|
18
|
-
virtual T operator()(
|
19
|
-
virtual T operator()(
|
20
|
-
virtual T operator()(
|
21
|
-
virtual T operator()(
|
22
|
-
virtual T operator()(
|
23
|
-
virtual T operator()(
|
24
|
-
virtual T operator()(
|
25
|
-
virtual T operator()(
|
26
|
-
virtual T operator()(
|
27
|
-
virtual T operator()(
|
28
|
-
virtual T operator()(
|
29
|
-
virtual T operator()(
|
30
|
-
virtual T operator()(
|
31
|
-
virtual T operator()(
|
32
|
-
virtual T operator()(
|
33
|
-
virtual T operator()(
|
34
|
-
virtual T operator()(
|
35
|
-
virtual T operator()(
|
36
|
-
virtual T operator()(
|
37
|
-
virtual T operator()(
|
38
|
-
virtual T operator()(
|
39
|
-
virtual T operator()(
|
14
|
+
virtual T operator()(Block_Ptr x) = 0;
|
15
|
+
virtual T operator()(Ruleset_Ptr x) = 0;
|
16
|
+
virtual T operator()(Bubble_Ptr x) = 0;
|
17
|
+
virtual T operator()(Trace_Ptr x) = 0;
|
18
|
+
virtual T operator()(Supports_Block_Ptr x) = 0;
|
19
|
+
virtual T operator()(Media_Block_Ptr x) = 0;
|
20
|
+
virtual T operator()(At_Root_Block_Ptr x) = 0;
|
21
|
+
virtual T operator()(Directive_Ptr x) = 0;
|
22
|
+
virtual T operator()(Keyframe_Rule_Ptr x) = 0;
|
23
|
+
virtual T operator()(Declaration_Ptr x) = 0;
|
24
|
+
virtual T operator()(Assignment_Ptr x) = 0;
|
25
|
+
virtual T operator()(Import_Ptr x) = 0;
|
26
|
+
virtual T operator()(Import_Stub_Ptr x) = 0;
|
27
|
+
virtual T operator()(Warning_Ptr x) = 0;
|
28
|
+
virtual T operator()(Error_Ptr x) = 0;
|
29
|
+
virtual T operator()(Debug_Ptr x) = 0;
|
30
|
+
virtual T operator()(Comment_Ptr x) = 0;
|
31
|
+
virtual T operator()(If_Ptr x) = 0;
|
32
|
+
virtual T operator()(For_Ptr x) = 0;
|
33
|
+
virtual T operator()(Each_Ptr x) = 0;
|
34
|
+
virtual T operator()(While_Ptr x) = 0;
|
35
|
+
virtual T operator()(Return_Ptr x) = 0;
|
36
|
+
virtual T operator()(Content_Ptr x) = 0;
|
37
|
+
virtual T operator()(Extension_Ptr x) = 0;
|
38
|
+
virtual T operator()(Definition_Ptr x) = 0;
|
39
|
+
virtual T operator()(Mixin_Call_Ptr x) = 0;
|
40
40
|
// expressions
|
41
|
-
virtual T operator()(
|
42
|
-
virtual T operator()(
|
43
|
-
virtual T operator()(
|
44
|
-
virtual T operator()(
|
45
|
-
virtual T operator()(
|
46
|
-
virtual T operator()(
|
47
|
-
virtual T operator()(
|
48
|
-
virtual T operator()(
|
49
|
-
virtual T operator()(
|
50
|
-
virtual T operator()(
|
51
|
-
virtual T operator()(
|
52
|
-
virtual T operator()(
|
53
|
-
virtual T operator()(
|
54
|
-
virtual T operator()(
|
55
|
-
virtual T operator()(
|
56
|
-
virtual T operator()(
|
57
|
-
virtual T operator()(
|
58
|
-
virtual T operator()(
|
59
|
-
virtual T operator()(
|
60
|
-
virtual T operator()(
|
61
|
-
virtual T operator()(
|
62
|
-
virtual T operator()(
|
63
|
-
virtual T operator()(
|
64
|
-
virtual T operator()(
|
65
|
-
virtual T operator()(
|
66
|
-
virtual T operator()(
|
41
|
+
virtual T operator()(List_Ptr x) = 0;
|
42
|
+
virtual T operator()(Map_Ptr x) = 0;
|
43
|
+
virtual T operator()(Binary_Expression_Ptr x) = 0;
|
44
|
+
virtual T operator()(Unary_Expression_Ptr x) = 0;
|
45
|
+
virtual T operator()(Function_Call_Ptr x) = 0;
|
46
|
+
virtual T operator()(Function_Call_Schema_Ptr x) = 0;
|
47
|
+
virtual T operator()(Custom_Warning_Ptr x) = 0;
|
48
|
+
virtual T operator()(Custom_Error_Ptr x) = 0;
|
49
|
+
virtual T operator()(Variable_Ptr x) = 0;
|
50
|
+
virtual T operator()(Textual_Ptr x) = 0;
|
51
|
+
virtual T operator()(Number_Ptr x) = 0;
|
52
|
+
virtual T operator()(Color_Ptr x) = 0;
|
53
|
+
virtual T operator()(Boolean_Ptr x) = 0;
|
54
|
+
virtual T operator()(String_Schema_Ptr x) = 0;
|
55
|
+
virtual T operator()(String_Quoted_Ptr x) = 0;
|
56
|
+
virtual T operator()(String_Constant_Ptr x) = 0;
|
57
|
+
virtual T operator()(Supports_Condition_Ptr x) = 0;
|
58
|
+
virtual T operator()(Supports_Operator_Ptr x) = 0;
|
59
|
+
virtual T operator()(Supports_Negation_Ptr x) = 0;
|
60
|
+
virtual T operator()(Supports_Declaration_Ptr x) = 0;
|
61
|
+
virtual T operator()(Supports_Interpolation_Ptr x) = 0;
|
62
|
+
virtual T operator()(Media_Query_Ptr x) = 0;
|
63
|
+
virtual T operator()(Media_Query_Expression_Ptr x) = 0;
|
64
|
+
virtual T operator()(At_Root_Query_Ptr x) = 0;
|
65
|
+
virtual T operator()(Null_Ptr x) = 0;
|
66
|
+
virtual T operator()(Parent_Selector_Ptr x) = 0;
|
67
67
|
// parameters and arguments
|
68
|
-
virtual T operator()(
|
69
|
-
virtual T operator()(
|
70
|
-
virtual T operator()(
|
71
|
-
virtual T operator()(
|
68
|
+
virtual T operator()(Parameter_Ptr x) = 0;
|
69
|
+
virtual T operator()(Parameters_Ptr x) = 0;
|
70
|
+
virtual T operator()(Argument_Ptr x) = 0;
|
71
|
+
virtual T operator()(Arguments_Ptr x) = 0;
|
72
72
|
// selectors
|
73
|
-
virtual T operator()(
|
74
|
-
virtual T operator()(
|
75
|
-
virtual T operator()(
|
76
|
-
virtual T operator()(
|
77
|
-
virtual T operator()(
|
78
|
-
virtual T operator()(
|
79
|
-
virtual T operator()(
|
80
|
-
virtual T operator()(
|
81
|
-
virtual T operator()(
|
82
|
-
virtual T operator()(
|
83
|
-
virtual T operator()(
|
73
|
+
virtual T operator()(Selector_Schema_Ptr x) = 0;
|
74
|
+
virtual T operator()(Placeholder_Selector_Ptr x) = 0;
|
75
|
+
virtual T operator()(Element_Selector_Ptr x) = 0;
|
76
|
+
virtual T operator()(Class_Selector_Ptr x) = 0;
|
77
|
+
virtual T operator()(Id_Selector_Ptr x) = 0;
|
78
|
+
virtual T operator()(Attribute_Selector_Ptr x) = 0;
|
79
|
+
virtual T operator()(Pseudo_Selector_Ptr x) = 0;
|
80
|
+
virtual T operator()(Wrapped_Selector_Ptr x) = 0;
|
81
|
+
virtual T operator()(Compound_Selector_Ptr x)= 0;
|
82
|
+
virtual T operator()(Complex_Selector_Ptr x) = 0;
|
83
|
+
virtual T operator()(Selector_List_Ptr x) = 0;
|
84
84
|
|
85
85
|
template <typename U>
|
86
86
|
T fallback(U x) { return T(); }
|
@@ -91,78 +91,78 @@ namespace Sass {
|
|
91
91
|
public:
|
92
92
|
D& impl() { return static_cast<D&>(*this); }
|
93
93
|
public:
|
94
|
-
T operator()(
|
94
|
+
T operator()(AST_Node_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
95
95
|
// statements
|
96
|
-
T operator()(
|
97
|
-
T operator()(
|
98
|
-
T operator()(
|
99
|
-
T operator()(
|
100
|
-
T operator()(
|
101
|
-
T operator()(
|
102
|
-
T operator()(
|
103
|
-
T operator()(
|
104
|
-
T operator()(
|
105
|
-
T operator()(
|
106
|
-
T operator()(
|
107
|
-
T operator()(
|
108
|
-
T operator()(
|
109
|
-
T operator()(
|
110
|
-
T operator()(
|
111
|
-
T operator()(
|
112
|
-
T operator()(
|
113
|
-
T operator()(
|
114
|
-
T operator()(
|
115
|
-
T operator()(
|
116
|
-
T operator()(
|
117
|
-
T operator()(
|
118
|
-
T operator()(
|
119
|
-
T operator()(
|
120
|
-
T operator()(
|
121
|
-
T operator()(
|
96
|
+
T operator()(Block_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
97
|
+
T operator()(Ruleset_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
98
|
+
T operator()(Bubble_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
99
|
+
T operator()(Trace_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
100
|
+
T operator()(Supports_Block_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
101
|
+
T operator()(Media_Block_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
102
|
+
T operator()(At_Root_Block_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
103
|
+
T operator()(Directive_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
104
|
+
T operator()(Keyframe_Rule_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
105
|
+
T operator()(Declaration_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
106
|
+
T operator()(Assignment_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
107
|
+
T operator()(Import_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
108
|
+
T operator()(Import_Stub_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
109
|
+
T operator()(Warning_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
110
|
+
T operator()(Error_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
111
|
+
T operator()(Debug_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
112
|
+
T operator()(Comment_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
113
|
+
T operator()(If_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
114
|
+
T operator()(For_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
115
|
+
T operator()(Each_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
116
|
+
T operator()(While_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
117
|
+
T operator()(Return_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
118
|
+
T operator()(Content_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
119
|
+
T operator()(Extension_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
120
|
+
T operator()(Definition_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
121
|
+
T operator()(Mixin_Call_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
122
122
|
// expressions
|
123
|
-
T operator()(
|
124
|
-
T operator()(
|
125
|
-
T operator()(
|
126
|
-
T operator()(
|
127
|
-
T operator()(
|
128
|
-
T operator()(
|
129
|
-
T operator()(
|
130
|
-
T operator()(
|
131
|
-
T operator()(
|
132
|
-
T operator()(
|
133
|
-
T operator()(
|
134
|
-
T operator()(
|
135
|
-
T operator()(
|
136
|
-
T operator()(
|
137
|
-
T operator()(
|
138
|
-
T operator()(
|
139
|
-
T operator()(
|
140
|
-
T operator()(
|
141
|
-
T operator()(
|
142
|
-
T operator()(
|
143
|
-
T operator()(
|
144
|
-
T operator()(
|
145
|
-
T operator()(
|
146
|
-
T operator()(
|
147
|
-
T operator()(
|
148
|
-
T operator()(
|
123
|
+
T operator()(List_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
124
|
+
T operator()(Map_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
125
|
+
T operator()(Binary_Expression_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
126
|
+
T operator()(Unary_Expression_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
127
|
+
T operator()(Function_Call_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
128
|
+
T operator()(Function_Call_Schema_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
129
|
+
T operator()(Custom_Warning_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
130
|
+
T operator()(Custom_Error_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
131
|
+
T operator()(Variable_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
132
|
+
T operator()(Textual_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
133
|
+
T operator()(Number_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
134
|
+
T operator()(Color_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
135
|
+
T operator()(Boolean_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
136
|
+
T operator()(String_Schema_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
137
|
+
T operator()(String_Constant_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
138
|
+
T operator()(String_Quoted_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
139
|
+
T operator()(Supports_Condition_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
140
|
+
T operator()(Supports_Operator_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
141
|
+
T operator()(Supports_Negation_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
142
|
+
T operator()(Supports_Declaration_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
143
|
+
T operator()(Supports_Interpolation_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
144
|
+
T operator()(Media_Query_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
145
|
+
T operator()(Media_Query_Expression_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
146
|
+
T operator()(At_Root_Query_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
147
|
+
T operator()(Null_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
148
|
+
T operator()(Parent_Selector_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
149
149
|
// parameters and arguments
|
150
|
-
T operator()(
|
151
|
-
T operator()(
|
152
|
-
T operator()(
|
153
|
-
T operator()(
|
150
|
+
T operator()(Parameter_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
151
|
+
T operator()(Parameters_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
152
|
+
T operator()(Argument_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
153
|
+
T operator()(Arguments_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
154
154
|
// selectors
|
155
|
-
T operator()(
|
156
|
-
T operator()(
|
157
|
-
T operator()(
|
158
|
-
T operator()(
|
159
|
-
T operator()(
|
160
|
-
T operator()(
|
161
|
-
T operator()(
|
162
|
-
T operator()(
|
163
|
-
T operator()(
|
164
|
-
T operator()(
|
165
|
-
T operator()(
|
155
|
+
T operator()(Selector_Schema_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
156
|
+
T operator()(Placeholder_Selector_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
157
|
+
T operator()(Element_Selector_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
158
|
+
T operator()(Class_Selector_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
159
|
+
T operator()(Id_Selector_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
160
|
+
T operator()(Attribute_Selector_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
161
|
+
T operator()(Pseudo_Selector_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
162
|
+
T operator()(Wrapped_Selector_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
163
|
+
T operator()(Compound_Selector_Ptr x){ return static_cast<D*>(this)->fallback(x); }
|
164
|
+
T operator()(Complex_Selector_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
165
|
+
T operator()(Selector_List_Ptr x) { return static_cast<D*>(this)->fallback(x); }
|
166
166
|
|
167
167
|
template <typename U>
|
168
168
|
T fallback(U x) { return T(); }
|