Skip to content

Commit 66d478c

Browse files
committed
Rename Supports_Operator to SupportsOperation
1 parent a0c284d commit 66d478c

File tree

10 files changed

+26
-26
lines changed

10 files changed

+26
-26
lines changed

src/ast_fwd_decl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ namespace Sass {
8686
class Media_Query;
8787
class Media_Query_Expression;
8888
class SupportsCondition;
89-
class Supports_Operator;
89+
class SupportsOperation;
9090
class Supports_Negation;
9191
class Supports_Declaration;
9292
class Supports_Interpolation;
@@ -183,7 +183,7 @@ namespace Sass {
183183
IMPL_MEM_OBJ(Media_Query);
184184
IMPL_MEM_OBJ(Media_Query_Expression);
185185
IMPL_MEM_OBJ(SupportsCondition);
186-
IMPL_MEM_OBJ(Supports_Operator);
186+
IMPL_MEM_OBJ(SupportsOperation);
187187
IMPL_MEM_OBJ(Supports_Negation);
188188
IMPL_MEM_OBJ(Supports_Declaration);
189189
IMPL_MEM_OBJ(Supports_Interpolation);

src/ast_supports.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ namespace Sass {
3131
/////////////////////////////////////////////////////////////////////////
3232
/////////////////////////////////////////////////////////////////////////
3333

34-
Supports_Operator::Supports_Operator(SourceSpan pstate, SupportsConditionObj l, SupportsConditionObj r, Operand o)
34+
SupportsOperation::SupportsOperation(SourceSpan pstate, SupportsConditionObj l, SupportsConditionObj r, Operand o)
3535
: SupportsCondition(pstate), left_(l), right_(r), operand_(o)
3636
{ }
37-
Supports_Operator::Supports_Operator(const Supports_Operator* ptr)
37+
SupportsOperation::SupportsOperation(const SupportsOperation* ptr)
3838
: SupportsCondition(ptr),
3939
left_(ptr->left_),
4040
right_(ptr->right_),
4141
operand_(ptr->operand_)
4242
{ }
4343

44-
bool Supports_Operator::needs_parens(SupportsConditionObj cond) const
44+
bool SupportsOperation::needs_parens(SupportsConditionObj cond) const
4545
{
46-
if (Supports_Operator_Obj op = Cast<Supports_Operator>(cond)) {
46+
if (SupportsOperationObj op = Cast<SupportsOperation>(cond)) {
4747
return op->operand() != operand();
4848
}
4949
return Cast<Supports_Negation>(cond) != NULL;
@@ -62,7 +62,7 @@ namespace Sass {
6262
bool Supports_Negation::needs_parens(SupportsConditionObj cond) const
6363
{
6464
return Cast<Supports_Negation>(cond) ||
65-
Cast<Supports_Operator>(cond);
65+
Cast<SupportsOperation>(cond);
6666
}
6767

6868
/////////////////////////////////////////////////////////////////////////
@@ -103,7 +103,7 @@ namespace Sass {
103103

104104
IMPLEMENT_AST_OPERATORS(SupportsRule);
105105
IMPLEMENT_AST_OPERATORS(SupportsCondition);
106-
IMPLEMENT_AST_OPERATORS(Supports_Operator);
106+
IMPLEMENT_AST_OPERATORS(SupportsOperation);
107107
IMPLEMENT_AST_OPERATORS(Supports_Negation);
108108
IMPLEMENT_AST_OPERATORS(Supports_Declaration);
109109
IMPLEMENT_AST_OPERATORS(Supports_Interpolation);

src/ast_supports.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,17 @@ namespace Sass {
6262
////////////////////////////////////////////////////////////
6363
// An operator condition (e.g. `CONDITION1 and CONDITION2`).
6464
////////////////////////////////////////////////////////////
65-
class Supports_Operator : public SupportsCondition {
65+
class SupportsOperation : public SupportsCondition {
6666
public:
6767
enum Operand { AND, OR };
6868
private:
6969
ADD_PROPERTY(SupportsConditionObj, left);
7070
ADD_PROPERTY(SupportsConditionObj, right);
7171
ADD_PROPERTY(Operand, operand);
7272
public:
73-
Supports_Operator(SourceSpan pstate, SupportsConditionObj l, SupportsConditionObj r, Operand o);
73+
SupportsOperation(SourceSpan pstate, SupportsConditionObj l, SupportsConditionObj r, Operand o);
7474
virtual bool needs_parens(SupportsConditionObj cond) const override;
75-
ATTACH_AST_OPERATIONS(Supports_Operator)
75+
ATTACH_AST_OPERATIONS(SupportsOperation)
7676
ATTACH_CRTP_PERFORM_METHODS()
7777
};
7878

src/debugger.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,9 +544,9 @@ inline void debug_ast(AST_Node* node, sass::string ind, Env* env)
544544
std::cerr << " " << block->tabs() << std::endl;
545545
debug_ast(block->condition(), ind + " =@ ");
546546
debug_ast(block->block(), ind + " <>");
547-
} else if (Cast<Supports_Operator>(node)) {
548-
Supports_Operator* block = Cast<Supports_Operator>(node);
549-
std::cerr << ind << "Supports_Operator " << block;
547+
} else if (Cast<SupportsOperation>(node)) {
548+
SupportsOperation* block = Cast<SupportsOperation>(node);
549+
std::cerr << ind << "SupportsOperation " << block;
550550
std::cerr << " (" << pstate_source_position(node) << ")"
551551
<< std::endl;
552552
debug_ast(block->left(), ind + " left) ");

src/eval.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,11 +1313,11 @@ namespace Sass {
13131313
return str;
13141314
}
13151315

1316-
Expression* Eval::operator()(Supports_Operator* c)
1316+
Expression* Eval::operator()(SupportsOperation* c)
13171317
{
13181318
Expression* left = c->left()->perform(this);
13191319
Expression* right = c->right()->perform(this);
1320-
Supports_Operator* cc = SASS_MEMORY_NEW(Supports_Operator,
1320+
SupportsOperation* cc = SASS_MEMORY_NEW(SupportsOperation,
13211321
c->pstate(),
13221322
Cast<SupportsCondition>(left),
13231323
Cast<SupportsCondition>(right),

src/eval.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ namespace Sass {
6767
Media_Query* operator()(Media_Query*);
6868
Expression* operator()(Media_Query_Expression*);
6969
Expression* operator()(At_Root_Query*);
70-
Expression* operator()(Supports_Operator*);
70+
Expression* operator()(SupportsOperation*);
7171
Expression* operator()(Supports_Negation*);
7272
Expression* operator()(Supports_Declaration*);
7373
Expression* operator()(Supports_Interpolation*);

src/inspect.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -757,18 +757,18 @@ namespace Sass {
757757
append_token(w->message(), w);
758758
}
759759

760-
void Inspect::operator()(Supports_Operator* so)
760+
void Inspect::operator()(SupportsOperation* so)
761761
{
762762

763763
if (so->needs_parens(so->left())) append_string("(");
764764
so->left()->perform(this);
765765
if (so->needs_parens(so->left())) append_string(")");
766766

767-
if (so->operand() == Supports_Operator::AND) {
767+
if (so->operand() == SupportsOperation::AND) {
768768
append_mandatory_space();
769769
append_token("and", so);
770770
append_mandatory_space();
771-
} else if (so->operand() == Supports_Operator::OR) {
771+
} else if (so->operand() == SupportsOperation::OR) {
772772
append_mandatory_space();
773773
append_token("or", so);
774774
append_mandatory_space();

src/inspect.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ namespace Sass {
6262
virtual void operator()(String_Quoted*);
6363
virtual void operator()(Custom_Error*);
6464
virtual void operator()(Custom_Warning*);
65-
virtual void operator()(Supports_Operator*);
65+
virtual void operator()(SupportsOperation*);
6666
virtual void operator()(Supports_Negation*);
6767
virtual void operator()(Supports_Declaration*);
6868
virtual void operator()(Supports_Interpolation*);

src/operation.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ namespace Sass {
9595
virtual T operator()(String_Quoted* x) = 0;
9696
virtual T operator()(String_Constant* x) = 0;
9797
virtual T operator()(SupportsCondition* x) = 0;
98-
virtual T operator()(Supports_Operator* x) = 0;
98+
virtual T operator()(SupportsOperation* x) = 0;
9999
virtual T operator()(Supports_Negation* x) = 0;
100100
virtual T operator()(Supports_Declaration* x) = 0;
101101
virtual T operator()(Supports_Interpolation* x) = 0;
@@ -181,7 +181,7 @@ namespace Sass {
181181
T operator()(String_Constant* x) { return static_cast<D*>(this)->fallback(x); }
182182
T operator()(String_Quoted* x) { return static_cast<D*>(this)->fallback(x); }
183183
T operator()(SupportsCondition* x) { return static_cast<D*>(this)->fallback(x); }
184-
T operator()(Supports_Operator* x) { return static_cast<D*>(this)->fallback(x); }
184+
T operator()(SupportsOperation* x) { return static_cast<D*>(this)->fallback(x); }
185185
T operator()(Supports_Negation* x) { return static_cast<D*>(this)->fallback(x); }
186186
T operator()(Supports_Declaration* x) { return static_cast<D*>(this)->fallback(x); }
187187
T operator()(Supports_Interpolation* x) { return static_cast<D*>(this)->fallback(x); }

src/parser.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2329,15 +2329,15 @@ namespace Sass {
23292329
if (cond.isNull()) return {};
23302330

23312331
while (true) {
2332-
Supports_Operator::Operand op = Supports_Operator::OR;
2333-
if (lex < kwd_and >()) { op = Supports_Operator::AND; }
2332+
SupportsOperation::Operand op = SupportsOperation::OR;
2333+
if (lex < kwd_and >()) { op = SupportsOperation::AND; }
23342334
else if(!lex < kwd_or >()) { break; }
23352335

23362336
lex < css_whitespace >();
23372337
SupportsConditionObj right = parse_supports_condition_in_parens(/*parens_required=*/true);
23382338

23392339
// SupportsCondition* cc = SASS_MEMORY_NEW(SupportsCondition, *static_cast<SupportsCondition*>(cond));
2340-
cond = SASS_MEMORY_NEW(Supports_Operator, pstate, cond, right, op);
2340+
cond = SASS_MEMORY_NEW(SupportsOperation, pstate, cond, right, op);
23412341
}
23422342
return cond;
23432343
}

0 commit comments

Comments
 (0)