Skip to content

Commit 3e1cd23

Browse files
committed
Rename Ruleset to StyleRule
1 parent 57639ac commit 3e1cd23

20 files changed

+45
-45
lines changed

src/ast.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,17 +162,17 @@ namespace Sass {
162162
/////////////////////////////////////////////////////////////////////////
163163
/////////////////////////////////////////////////////////////////////////
164164

165-
Ruleset::Ruleset(ParserState pstate, SelectorListObj s, Block_Obj b)
165+
StyleRule::StyleRule(ParserState pstate, SelectorListObj s, Block_Obj b)
166166
: ParentStatement(pstate, b), selector_(s), schema_(), is_root_(false)
167167
{ statement_type(RULESET); }
168-
Ruleset::Ruleset(const Ruleset* ptr)
168+
StyleRule::StyleRule(const StyleRule* ptr)
169169
: ParentStatement(ptr),
170170
selector_(ptr->selector_),
171171
schema_(ptr->schema_),
172172
is_root_(ptr->is_root_)
173173
{ statement_type(RULESET); }
174174

175-
bool Ruleset::is_invisible() const {
175+
bool StyleRule::is_invisible() const {
176176
if (const SelectorList * sl = Cast<SelectorList>(selector())) {
177177
for (size_t i = 0, L = sl->length(); i < L; i += 1)
178178
if (!(*sl)[i]->isInvisible()) return false;
@@ -911,7 +911,7 @@ namespace Sass {
911911
// If you forget to add a class here you will get
912912
// undefined reference to `vtable for Sass::Class'
913913

914-
IMPLEMENT_AST_OPERATORS(Ruleset);
914+
IMPLEMENT_AST_OPERATORS(StyleRule);
915915
IMPLEMENT_AST_OPERATORS(MediaRule);
916916
IMPLEMENT_AST_OPERATORS(CssMediaRule);
917917
IMPLEMENT_AST_OPERATORS(CssMediaQuery);

src/ast.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -529,14 +529,14 @@ namespace Sass {
529529
// Rulesets (i.e., sets of styles headed by a selector and containing a block
530530
// of style declarations.
531531
/////////////////////////////////////////////////////////////////////////////
532-
class Ruleset final : public ParentStatement {
532+
class StyleRule final : public ParentStatement {
533533
ADD_PROPERTY(SelectorListObj, selector)
534534
ADD_PROPERTY(Selector_Schema_Obj, schema)
535535
ADD_PROPERTY(bool, is_root);
536536
public:
537-
Ruleset(ParserState pstate, SelectorListObj s = {}, Block_Obj b = {});
537+
StyleRule(ParserState pstate, SelectorListObj s = {}, Block_Obj b = {});
538538
bool is_invisible() const override;
539-
ATTACH_AST_OPERATIONS(Ruleset)
539+
ATTACH_AST_OPERATIONS(StyleRule)
540540
ATTACH_CRTP_PERFORM_METHODS()
541541
};
542542

@@ -880,7 +880,7 @@ namespace Sass {
880880
};
881881

882882

883-
// A Media Ruleset before it has been evaluated
883+
// A Media StyleRule before it has been evaluated
884884
// Could be already final or an interpolation
885885
class MediaRule final : public ParentStatement {
886886
ADD_PROPERTY(List_Obj, schema)
@@ -893,7 +893,7 @@ namespace Sass {
893893
ATTACH_CRTP_PERFORM_METHODS()
894894
};
895895

896-
// A Media Ruleset after it has been evaluated
896+
// A Media StyleRule after it has been evaluated
897897
// Representing the static or resulting css
898898
class CssMediaRule final : public ParentStatement,
899899
public Vectorized<CssMediaQuery_Obj> {

src/ast_fwd_decl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace Sass {
2727
class Statement;
2828
class Value;
2929
class Declaration;
30-
class Ruleset;
30+
class StyleRule;
3131
class Bubble;
3232
class Trace;
3333

@@ -131,7 +131,7 @@ namespace Sass {
131131
IMPL_MEM_OBJ(AST_Node);
132132
IMPL_MEM_OBJ(Statement);
133133
IMPL_MEM_OBJ(Block);
134-
IMPL_MEM_OBJ(Ruleset);
134+
IMPL_MEM_OBJ(StyleRule);
135135
IMPL_MEM_OBJ(Bubble);
136136
IMPL_MEM_OBJ(Trace);
137137
IMPL_MEM_OBJ(MediaRule);

src/check_nesting.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ namespace Sass {
192192
void CheckNesting::invalid_extend_parent(Statement* parent, AST_Node* node)
193193
{
194194
if (!(
195-
Cast<Ruleset>(parent) ||
195+
Cast<StyleRule>(parent) ||
196196
Cast<Mixin_Call>(parent) ||
197197
is_mixin(parent)
198198
)) {
@@ -301,7 +301,7 @@ namespace Sass {
301301
if (!(
302302
is_mixin(parent) ||
303303
is_directive_node(parent) ||
304-
Cast<Ruleset>(parent) ||
304+
Cast<StyleRule>(parent) ||
305305
Cast<Keyframe_Rule>(parent) ||
306306
Cast<Declaration>(parent) ||
307307
Cast<Mixin_Call>(parent)
@@ -371,7 +371,7 @@ namespace Sass {
371371

372372
bool CheckNesting::is_root_node(Statement* n)
373373
{
374-
if (Cast<Ruleset>(n)) return false;
374+
if (Cast<StyleRule>(n)) return false;
375375

376376
Block* b = Cast<Block>(n);
377377
return b && b->is_root();

src/cssize.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ namespace Sass {
142142
return debubble(rr->block(), rr);
143143
}
144144

145-
Statement* Cssize::operator()(Ruleset* r)
145+
Statement* Cssize::operator()(StyleRule* r)
146146
{
147147
p_stack.push_back(r);
148148
// this can return a string schema
@@ -155,7 +155,7 @@ namespace Sass {
155155
if (Cast<Statement>(bb) == NULL) {
156156
error("Illegal nesting: Only properties may be nested beneath properties.", r->block()->pstate(), traces);
157157
}
158-
Ruleset_Obj rr = SASS_MEMORY_NEW(Ruleset,
158+
StyleRuleObj rr = SASS_MEMORY_NEW(StyleRule,
159159
r->pstate(),
160160
r->selector(),
161161
bb);
@@ -331,10 +331,10 @@ namespace Sass {
331331

332332
Statement* Cssize::bubble(Supports_Block* m)
333333
{
334-
Ruleset_Obj parent = Cast<Ruleset>(SASS_MEMORY_COPY(this->parent()));
334+
StyleRuleObj parent = Cast<StyleRule>(SASS_MEMORY_COPY(this->parent()));
335335

336336
Block* bb = SASS_MEMORY_NEW(Block, parent->block()->pstate());
337-
Ruleset* new_rule = SASS_MEMORY_NEW(Ruleset,
337+
StyleRule* new_rule = SASS_MEMORY_NEW(StyleRule,
338338
parent->pstate(),
339339
parent->selector(),
340340
bb);
@@ -356,10 +356,10 @@ namespace Sass {
356356

357357
Statement* Cssize::bubble(CssMediaRule* m)
358358
{
359-
Ruleset_Obj parent = Cast<Ruleset>(SASS_MEMORY_COPY(this->parent()));
359+
StyleRuleObj parent = Cast<StyleRule>(SASS_MEMORY_COPY(this->parent()));
360360

361361
Block* bb = SASS_MEMORY_NEW(Block, parent->block()->pstate());
362-
Ruleset* new_rule = SASS_MEMORY_NEW(Ruleset,
362+
StyleRule* new_rule = SASS_MEMORY_NEW(StyleRule,
363363
parent->pstate(),
364364
parent->selector(),
365365
bb);
@@ -380,7 +380,7 @@ namespace Sass {
380380

381381
bool Cssize::bubblable(Statement* s)
382382
{
383-
return Cast<Ruleset>(s) || s->bubbles();
383+
return Cast<StyleRule>(s) || s->bubbles();
384384
}
385385

386386
Block* Cssize::flatten(const Block* b)

src/cssize.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace Sass {
2121
~Cssize() { }
2222

2323
Block* operator()(Block*);
24-
Statement* operator()(Ruleset*);
24+
Statement* operator()(StyleRule*);
2525
// Statement* operator()(Bubble*);
2626
Statement* operator()(CssMediaRule*);
2727
Statement* operator()(Supports_Block*);

src/debugger.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -712,8 +712,8 @@ inline void debug_ast(AST_Node* node, sass::string ind, Env* env)
712712
debug_ast(block->arguments(), ind + " args: ", env);
713713
debug_ast(block->block_parameters(), ind + " block_params: ", env);
714714
if (block->block()) debug_ast(block->block(), ind + " ", env);
715-
} else if (Ruleset* ruleset = Cast<Ruleset>(node)) {
716-
std::cerr << ind << "Ruleset " << ruleset;
715+
} else if (StyleRule* ruleset = Cast<StyleRule>(node)) {
716+
std::cerr << ind << "StyleRule " << ruleset;
717717
std::cerr << " (" << pstate_source_position(node) << ")";
718718
std::cerr << " [indent: " << ruleset->tabs() << "]";
719719
std::cerr << (ruleset->is_invisible() ? " [INVISIBLE]" : "");

src/expand.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ namespace Sass {
162162
return bb.detach();
163163
}
164164

165-
Statement* Expand::operator()(Ruleset* r)
165+
Statement* Expand::operator()(StyleRule* r)
166166
{
167167
LOCAL_FLAG(old_at_root_without_rule, at_root_without_rule);
168168

@@ -213,7 +213,7 @@ namespace Sass {
213213
if (r->block()) blk = operator()(r->block());
214214
popFromOriginalStack();
215215
popFromSelectorStack();
216-
Ruleset* rr = SASS_MEMORY_NEW(Ruleset,
216+
StyleRule* rr = SASS_MEMORY_NEW(StyleRule,
217217
r->pstate(),
218218
evaled,
219219
blk);
@@ -820,7 +820,7 @@ namespace Sass {
820820
}
821821
block_stack.push_back(trace_block);
822822
for (auto bb : body->elements()) {
823-
if (Ruleset* r = Cast<Ruleset>(bb)) {
823+
if (StyleRule* r = Cast<StyleRule>(bb)) {
824824
r->is_root(trace_block->is_root());
825825
}
826826
Statement_Obj ith = bb->perform(this);

src/expand.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ namespace Sass {
6161
~Expand() { }
6262

6363
Block* operator()(Block*);
64-
Statement* operator()(Ruleset*);
64+
Statement* operator()(StyleRule*);
6565

6666
Statement* operator()(MediaRule*);
6767

68-
// Css Ruleset is already static
68+
// Css StyleRule is already static
6969
// Statement* operator()(CssMediaRule*);
7070

7171
Statement* operator()(Supports_Block*);

src/inspect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace Sass {
4242

4343
}
4444

45-
void Inspect::operator()(Ruleset* ruleset)
45+
void Inspect::operator()(StyleRule* ruleset)
4646
{
4747
if (ruleset->selector()) {
4848
ruleset->selector()->perform(this);

0 commit comments

Comments
 (0)