Skip to content

Commit 667786b

Browse files
committed
[WIP] [DNM] Backport dart sass parser 11
1 parent 21a6183 commit 667786b

File tree

9 files changed

+295
-477
lines changed

9 files changed

+295
-477
lines changed

src/ast_selectors.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,6 @@ namespace Sass {
8484
return has_ns_ && ns_ == "*";
8585
}
8686

87-
bool SimpleSelector::is_empty_ns() const
88-
{
89-
return !has_ns_ || ns_ == "";
90-
}
91-
92-
bool SimpleSelector::has_empty_ns() const
93-
{
94-
return has_ns_ && ns_ == "";
95-
}
96-
97-
bool SimpleSelector::has_qualified_ns() const
98-
{
99-
return has_ns_ && ns_ != "" && ns_ != "*";
100-
}
101-
10287
// name query functions
10388
bool SimpleSelector::is_universal() const
10489
{

src/ast_selectors.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,6 @@ namespace Sass {
8989
bool is_ns_eq(const SimpleSelector& r) const;
9090
// namespace query functions
9191
bool is_universal_ns() const;
92-
bool is_empty_ns() const;
93-
bool has_empty_ns() const;
94-
bool has_qualified_ns() const;
9592
// name query functions
9693
bool is_universal() const;
9794
virtual bool has_placeholder();

src/emitter.cpp

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ namespace Sass {
2222
scheduled_crutch(0),
2323
scheduled_mapping(0),
2424
in_custom_property(false),
25-
in_comment(false),
26-
in_wrapped(false),
27-
in_media_block(false),
2825
in_declaration(false),
2926
separators(),
3027
in_space_array(false),
@@ -136,23 +133,12 @@ namespace Sass {
136133
// append some text or token to the buffer
137134
void Emitter::append_string(const std::string& text)
138135
{
139-
140136
// write space/lf
141137
flush_schedules();
142-
143-
if (in_comment) {
144-
std::string out = Util::normalize_newlines(text);
145-
if (output_style() == COMPACT) {
146-
out = comment_to_compact_string(out);
147-
}
148-
wbuf.smap.append(Offset(out));
149-
wbuf.buffer += std::move(out);
150-
} else {
151-
// add to buffer
152-
wbuf.buffer += text;
153-
// account for data in source-maps
154-
wbuf.smap.append(Offset(text));
155-
}
138+
// add to buffer
139+
wbuf.buffer += text;
140+
// account for data in source-maps
141+
wbuf.smap.append(Offset(text));
156142
}
157143

158144
// append some white-space only text

src/emitter.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ namespace Sass {
4646
public:
4747
// output strings different in custom css properties
4848
bool in_custom_property;
49-
// output strings different in comments
50-
bool in_comment;
51-
// selector list does not get linefeeds
52-
bool in_wrapped;
53-
// lists always get a space after delimiter
54-
bool in_media_block;
5549
// nested list must not have parentheses
5650
bool in_declaration;
5751
// nested lists need parentheses

0 commit comments

Comments
 (0)