Skip to content

Commit cdd51f4

Browse files
committed
Rename Each to EachRule
1 parent da17d82 commit cdd51f4

15 files changed

+29
-29
lines changed

src/ast.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,10 +397,10 @@ namespace Sass {
397397
/////////////////////////////////////////////////////////////////////////
398398
/////////////////////////////////////////////////////////////////////////
399399

400-
Each::Each(ParserState pstate, sass::vector<sass::string> vars, Expression_Obj lst, Block_Obj b)
400+
EachRule::EachRule(ParserState pstate, sass::vector<sass::string> vars, Expression_Obj lst, Block_Obj b)
401401
: ParentStatement(pstate, b), variables_(vars), list_(lst)
402402
{ statement_type(EACH); }
403-
Each::Each(const Each* ptr)
403+
EachRule::EachRule(const EachRule* ptr)
404404
: ParentStatement(ptr), variables_(ptr->variables_), list_(ptr->list_)
405405
{ statement_type(EACH); }
406406

@@ -920,7 +920,7 @@ namespace Sass {
920920
IMPLEMENT_AST_OPERATORS(Directive);
921921
IMPLEMENT_AST_OPERATORS(At_Root_Block);
922922
IMPLEMENT_AST_OPERATORS(WhileRule);
923-
IMPLEMENT_AST_OPERATORS(Each);
923+
IMPLEMENT_AST_OPERATORS(EachRule);
924924
IMPLEMENT_AST_OPERATORS(For);
925925
IMPLEMENT_AST_OPERATORS(If);
926926
IMPLEMENT_AST_OPERATORS(Mixin_Call);

src/ast.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -730,12 +730,12 @@ namespace Sass {
730730
//////////////////////////////////////
731731
// The Sass `@each` control directive.
732732
//////////////////////////////////////
733-
class Each final : public ParentStatement {
733+
class EachRule final : public ParentStatement {
734734
ADD_PROPERTY(sass::vector<sass::string>, variables)
735735
ADD_PROPERTY(Expression_Obj, list)
736736
public:
737-
Each(ParserState pstate, sass::vector<sass::string> vars, Expression_Obj lst, Block_Obj b);
738-
ATTACH_AST_OPERATIONS(Each)
737+
EachRule(ParserState pstate, sass::vector<sass::string> vars, Expression_Obj lst, Block_Obj b);
738+
ATTACH_AST_OPERATIONS(EachRule)
739739
ATTACH_CRTP_PERFORM_METHODS()
740740
};
741741

src/ast_fwd_decl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ namespace Sass {
5252

5353
class If;
5454
class For;
55-
class Each;
55+
class EachRule;
5656
class WhileRule;
5757
class Return;
5858
class Content;
@@ -153,7 +153,7 @@ namespace Sass {
153153
IMPL_MEM_OBJ(ParentStatement);
154154
IMPL_MEM_OBJ(If);
155155
IMPL_MEM_OBJ(For);
156-
IMPL_MEM_OBJ(Each);
156+
IMPL_MEM_OBJ(EachRule);
157157
IMPL_MEM_OBJ(WhileRule);
158158
IMPL_MEM_OBJ(Return);
159159
IMPL_MEM_OBJ(Content);

src/check_nesting.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ namespace Sass {
204204
// {
205205
// for (auto pp : this->parents) {
206206
// if (
207-
// Cast<Each>(pp) ||
207+
// Cast<EachRule>(pp) ||
208208
// Cast<For>(pp) ||
209209
// Cast<If>(pp) ||
210210
// Cast<WhileRule>(pp) ||
@@ -229,7 +229,7 @@ namespace Sass {
229229
{
230230
for (Statement* pp : this->parents) {
231231
if (
232-
Cast<Each>(pp) ||
232+
Cast<EachRule>(pp) ||
233233
Cast<For>(pp) ||
234234
Cast<If>(pp) ||
235235
Cast<WhileRule>(pp) ||
@@ -246,7 +246,7 @@ namespace Sass {
246246
{
247247
for (Statement* pp : this->parents) {
248248
if (
249-
Cast<Each>(pp) ||
249+
Cast<EachRule>(pp) ||
250250
Cast<For>(pp) ||
251251
Cast<If>(pp) ||
252252
Cast<WhileRule>(pp) ||
@@ -262,7 +262,7 @@ namespace Sass {
262262
void CheckNesting::invalid_function_child(Statement* child)
263263
{
264264
if (!(
265-
Cast<Each>(child) ||
265+
Cast<EachRule>(child) ||
266266
Cast<For>(child) ||
267267
Cast<If>(child) ||
268268
Cast<WhileRule>(child) ||
@@ -283,7 +283,7 @@ namespace Sass {
283283
void CheckNesting::invalid_prop_child(Statement* child)
284284
{
285285
if (!(
286-
Cast<Each>(child) ||
286+
Cast<EachRule>(child) ||
287287
Cast<For>(child) ||
288288
Cast<If>(child) ||
289289
Cast<WhileRule>(child) ||
@@ -343,7 +343,7 @@ namespace Sass {
343343
!is_at_root_node(grandparent);
344344

345345
return Cast<Import>(parent) ||
346-
Cast<Each>(parent) ||
346+
Cast<EachRule>(parent) ||
347347
Cast<For>(parent) ||
348348
Cast<If>(parent) ||
349349
Cast<WhileRule>(parent) ||

src/cssize.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace Sass {
3838
// Statement* operator()(Comment*);
3939
// Statement* operator()(If*);
4040
// Statement* operator()(For*);
41-
// Statement* operator()(Each*);
41+
// Statement* operator()(EachRule*);
4242
// Statement* operator()(WhileRule*);
4343
// Statement* operator()(Return*);
4444
// Statement* operator()(ExtendRule*);

src/debugger.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,9 +673,9 @@ inline void debug_ast(AST_Node* node, sass::string ind, Env* env)
673673
debug_ast(block->selector(), ind + "~", env);
674674
debug_ast(block->value(), ind + "+", env);
675675
if (block->block()) for(const Statement_Obj& i : block->block()->elements()) { debug_ast(i, ind + " ", env); }
676-
} else if (Cast<Each>(node)) {
677-
Each* block = Cast<Each>(node);
678-
std::cerr << ind << "Each " << block;
676+
} else if (Cast<EachRule>(node)) {
677+
EachRule* block = Cast<EachRule>(node);
678+
std::cerr << ind << "EachRule " << block;
679679
std::cerr << " (" << pstate_source_position(node) << ")";
680680
std::cerr << " " << block->tabs() << std::endl;
681681
if (block->block()) for(const Statement_Obj& i : block->block()->elements()) { debug_ast(i, ind + " ", env); }

src/eval.cpp

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

224224
// Eval does not create a new env scope
225225
// But iteration vars are reset afterwards
226-
Expression* Eval::operator()(Each* e)
226+
Expression* Eval::operator()(EachRule* e)
227227
{
228228
sass::vector<sass::string> variables(e->variables());
229229
Expression_Obj expr = e->list()->perform(this);

src/eval.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace Sass {
4444
Expression* operator()(Assignment*);
4545
Expression* operator()(If*);
4646
Expression* operator()(For*);
47-
Expression* operator()(Each*);
47+
Expression* operator()(EachRule*);
4848
Expression* operator()(WhileRule*);
4949
Expression* operator()(Return*);
5050
Expression* operator()(WarningRule*);

src/expand.cpp

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

570570
// Eval does not create a new env scope
571571
// But iteration vars are reset afterwards
572-
Statement* Expand::operator()(Each* e)
572+
Statement* Expand::operator()(EachRule* e)
573573
{
574574
sass::vector<sass::string> variables(e->variables());
575575
Expression_Obj expr = e->list()->perform(&eval);

src/expand.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ namespace Sass {
8181
Statement* operator()(Comment*);
8282
Statement* operator()(If*);
8383
Statement* operator()(For*);
84-
Statement* operator()(Each*);
84+
Statement* operator()(EachRule*);
8585
Statement* operator()(WhileRule*);
8686
Statement* operator()(Return*);
8787
Statement* operator()(ExtendRule*);

0 commit comments

Comments
 (0)