Skip to content

Commit 9961db7

Browse files
committed
Rename For to ForRule
1 parent cdd51f4 commit 9961db7

15 files changed

+29
-29
lines changed

src/ast.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,12 @@ namespace Sass {
381381
/////////////////////////////////////////////////////////////////////////
382382
/////////////////////////////////////////////////////////////////////////
383383

384-
For::For(ParserState pstate,
384+
ForRule::ForRule(ParserState pstate,
385385
sass::string var, Expression_Obj lo, Expression_Obj hi, Block_Obj b, bool inc)
386386
: ParentStatement(pstate, b),
387387
variable_(var), lower_bound_(lo), upper_bound_(hi), is_inclusive_(inc)
388388
{ statement_type(FOR); }
389-
For::For(const For* ptr)
389+
ForRule::ForRule(const ForRule* ptr)
390390
: ParentStatement(ptr),
391391
variable_(ptr->variable_),
392392
lower_bound_(ptr->lower_bound_),
@@ -921,7 +921,7 @@ namespace Sass {
921921
IMPLEMENT_AST_OPERATORS(At_Root_Block);
922922
IMPLEMENT_AST_OPERATORS(WhileRule);
923923
IMPLEMENT_AST_OPERATORS(EachRule);
924-
IMPLEMENT_AST_OPERATORS(For);
924+
IMPLEMENT_AST_OPERATORS(ForRule);
925925
IMPLEMENT_AST_OPERATORS(If);
926926
IMPLEMENT_AST_OPERATORS(Mixin_Call);
927927
IMPLEMENT_AST_OPERATORS(ExtendRule);

src/ast.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -716,14 +716,14 @@ namespace Sass {
716716
/////////////////////////////////////
717717
// The Sass `@for` control directive.
718718
/////////////////////////////////////
719-
class For final : public ParentStatement {
719+
class ForRule final : public ParentStatement {
720720
ADD_CONSTREF(sass::string, variable)
721721
ADD_PROPERTY(Expression_Obj, lower_bound)
722722
ADD_PROPERTY(Expression_Obj, upper_bound)
723723
ADD_PROPERTY(bool, is_inclusive)
724724
public:
725-
For(ParserState pstate, sass::string var, Expression_Obj lo, Expression_Obj hi, Block_Obj b, bool inc);
726-
ATTACH_AST_OPERATIONS(For)
725+
ForRule(ParserState pstate, sass::string var, Expression_Obj lo, Expression_Obj hi, Block_Obj b, bool inc);
726+
ATTACH_AST_OPERATIONS(ForRule)
727727
ATTACH_CRTP_PERFORM_METHODS()
728728
};
729729

src/ast_fwd_decl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ namespace Sass {
5151
class Comment;
5252

5353
class If;
54-
class For;
54+
class ForRule;
5555
class EachRule;
5656
class WhileRule;
5757
class Return;
@@ -152,7 +152,7 @@ namespace Sass {
152152
IMPL_MEM_OBJ(PreValue);
153153
IMPL_MEM_OBJ(ParentStatement);
154154
IMPL_MEM_OBJ(If);
155-
IMPL_MEM_OBJ(For);
155+
IMPL_MEM_OBJ(ForRule);
156156
IMPL_MEM_OBJ(EachRule);
157157
IMPL_MEM_OBJ(WhileRule);
158158
IMPL_MEM_OBJ(Return);

src/check_nesting.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ namespace Sass {
205205
// for (auto pp : this->parents) {
206206
// if (
207207
// Cast<EachRule>(pp) ||
208-
// Cast<For>(pp) ||
208+
// Cast<ForRule>(pp) ||
209209
// Cast<If>(pp) ||
210210
// Cast<WhileRule>(pp) ||
211211
// Cast<Trace>(pp) ||
@@ -230,7 +230,7 @@ namespace Sass {
230230
for (Statement* pp : this->parents) {
231231
if (
232232
Cast<EachRule>(pp) ||
233-
Cast<For>(pp) ||
233+
Cast<ForRule>(pp) ||
234234
Cast<If>(pp) ||
235235
Cast<WhileRule>(pp) ||
236236
Cast<Trace>(pp) ||
@@ -247,7 +247,7 @@ namespace Sass {
247247
for (Statement* pp : this->parents) {
248248
if (
249249
Cast<EachRule>(pp) ||
250-
Cast<For>(pp) ||
250+
Cast<ForRule>(pp) ||
251251
Cast<If>(pp) ||
252252
Cast<WhileRule>(pp) ||
253253
Cast<Trace>(pp) ||
@@ -263,7 +263,7 @@ namespace Sass {
263263
{
264264
if (!(
265265
Cast<EachRule>(child) ||
266-
Cast<For>(child) ||
266+
Cast<ForRule>(child) ||
267267
Cast<If>(child) ||
268268
Cast<WhileRule>(child) ||
269269
Cast<Trace>(child) ||
@@ -284,7 +284,7 @@ namespace Sass {
284284
{
285285
if (!(
286286
Cast<EachRule>(child) ||
287-
Cast<For>(child) ||
287+
Cast<ForRule>(child) ||
288288
Cast<If>(child) ||
289289
Cast<WhileRule>(child) ||
290290
Cast<Trace>(child) ||
@@ -344,7 +344,7 @@ namespace Sass {
344344

345345
return Cast<Import>(parent) ||
346346
Cast<EachRule>(parent) ||
347-
Cast<For>(parent) ||
347+
Cast<ForRule>(parent) ||
348348
Cast<If>(parent) ||
349349
Cast<WhileRule>(parent) ||
350350
Cast<Trace>(parent) ||

src/cssize.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace Sass {
3737
// Statement* operator()(Error*);
3838
// Statement* operator()(Comment*);
3939
// Statement* operator()(If*);
40-
// Statement* operator()(For*);
40+
// Statement* operator()(ForRule*);
4141
// Statement* operator()(EachRule*);
4242
// Statement* operator()(WhileRule*);
4343
// Statement* operator()(Return*);

src/debugger.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -679,9 +679,9 @@ inline void debug_ast(AST_Node* node, sass::string ind, Env* env)
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); }
682-
} else if (Cast<For>(node)) {
683-
For* block = Cast<For>(node);
684-
std::cerr << ind << "For " << block;
682+
} else if (Cast<ForRule>(node)) {
683+
ForRule* block = Cast<ForRule>(node);
684+
std::cerr << ind << "ForRule " << block;
685685
std::cerr << " (" << pstate_source_position(node) << ")";
686686
std::cerr << " " << block->tabs() << std::endl;
687687
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
@@ -167,7 +167,7 @@ namespace Sass {
167167

168168
// For does not create a new env scope
169169
// But iteration vars are reset afterwards
170-
Expression* Eval::operator()(For* f)
170+
Expression* Eval::operator()(ForRule* f)
171171
{
172172
sass::string variable(f->variable());
173173
Expression_Obj low = f->lower_bound()->perform(this);

src/eval.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace Sass {
4343
Expression* operator()(Block*);
4444
Expression* operator()(Assignment*);
4545
Expression* operator()(If*);
46-
Expression* operator()(For*);
46+
Expression* operator()(ForRule*);
4747
Expression* operator()(EachRule*);
4848
Expression* operator()(WhileRule*);
4949
Expression* operator()(Return*);

src/expand.cpp

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

515515
// For does not create a new env scope
516516
// But iteration vars are reset afterwards
517-
Statement* Expand::operator()(For* f)
517+
Statement* Expand::operator()(ForRule* f)
518518
{
519519
sass::string variable(f->variable());
520520
Expression_Obj low = f->lower_bound()->perform(&eval);

src/expand.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ namespace Sass {
8080
Statement* operator()(DebugRule*);
8181
Statement* operator()(Comment*);
8282
Statement* operator()(If*);
83-
Statement* operator()(For*);
83+
Statement* operator()(ForRule*);
8484
Statement* operator()(EachRule*);
8585
Statement* operator()(WhileRule*);
8686
Statement* operator()(Return*);

0 commit comments

Comments
 (0)