Skip to content

Commit a0c284d

Browse files
committed
Rename Supports_Operator to SupportsOperator
1 parent 8fbd1ff commit a0c284d

File tree

10 files changed

+71
-71
lines changed

10 files changed

+71
-71
lines changed

src/ast_fwd_decl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace Sass {
2323
IMPLEMENT_BASE_CAST(List)
2424
IMPLEMENT_BASE_CAST(String)
2525
IMPLEMENT_BASE_CAST(String_Constant)
26-
IMPLEMENT_BASE_CAST(Supports_Condition)
26+
IMPLEMENT_BASE_CAST(SupportsCondition)
2727
IMPLEMENT_BASE_CAST(Selector)
2828
IMPLEMENT_BASE_CAST(SelectorComponent)
2929
IMPLEMENT_BASE_CAST(SimpleSelector)

src/ast_fwd_decl.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ namespace Sass {
8585

8686
class Media_Query;
8787
class Media_Query_Expression;
88-
class Supports_Condition;
88+
class SupportsCondition;
8989
class Supports_Operator;
9090
class Supports_Negation;
9191
class Supports_Declaration;
@@ -182,7 +182,7 @@ namespace Sass {
182182
IMPL_MEM_OBJ(String_Quoted);
183183
IMPL_MEM_OBJ(Media_Query);
184184
IMPL_MEM_OBJ(Media_Query_Expression);
185-
IMPL_MEM_OBJ(Supports_Condition);
185+
IMPL_MEM_OBJ(SupportsCondition);
186186
IMPL_MEM_OBJ(Supports_Operator);
187187
IMPL_MEM_OBJ(Supports_Negation);
188188
IMPL_MEM_OBJ(Supports_Declaration);
@@ -255,7 +255,7 @@ namespace Sass {
255255
DECLARE_BASE_CAST(Color)
256256
DECLARE_BASE_CAST(String)
257257
DECLARE_BASE_CAST(String_Constant)
258-
DECLARE_BASE_CAST(Supports_Condition)
258+
DECLARE_BASE_CAST(SupportsCondition)
259259
DECLARE_BASE_CAST(Selector)
260260
DECLARE_BASE_CAST(SimpleSelector)
261261
DECLARE_BASE_CAST(SelectorComponent)

src/ast_supports.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Sass {
99
/////////////////////////////////////////////////////////////////////////
1010
/////////////////////////////////////////////////////////////////////////
1111

12-
SupportsRule::SupportsRule(SourceSpan pstate, Supports_Condition_Obj condition, Block_Obj block)
12+
SupportsRule::SupportsRule(SourceSpan pstate, SupportsConditionObj condition, Block_Obj block)
1313
: ParentStatement(pstate, block), condition_(condition)
1414
{ statement_type(SUPPORTS); }
1515
SupportsRule::SupportsRule(const SupportsRule* ptr)
@@ -20,28 +20,28 @@ namespace Sass {
2020
/////////////////////////////////////////////////////////////////////////
2121
/////////////////////////////////////////////////////////////////////////
2222

23-
Supports_Condition::Supports_Condition(SourceSpan pstate)
23+
SupportsCondition::SupportsCondition(SourceSpan pstate)
2424
: Expression(pstate)
2525
{ }
2626

27-
Supports_Condition::Supports_Condition(const Supports_Condition* ptr)
27+
SupportsCondition::SupportsCondition(const SupportsCondition* ptr)
2828
: Expression(ptr)
2929
{ }
3030

3131
/////////////////////////////////////////////////////////////////////////
3232
/////////////////////////////////////////////////////////////////////////
3333

34-
Supports_Operator::Supports_Operator(SourceSpan pstate, Supports_Condition_Obj l, Supports_Condition_Obj r, Operand o)
35-
: Supports_Condition(pstate), left_(l), right_(r), operand_(o)
34+
Supports_Operator::Supports_Operator(SourceSpan pstate, SupportsConditionObj l, SupportsConditionObj r, Operand o)
35+
: SupportsCondition(pstate), left_(l), right_(r), operand_(o)
3636
{ }
3737
Supports_Operator::Supports_Operator(const Supports_Operator* ptr)
38-
: Supports_Condition(ptr),
38+
: SupportsCondition(ptr),
3939
left_(ptr->left_),
4040
right_(ptr->right_),
4141
operand_(ptr->operand_)
4242
{ }
4343

44-
bool Supports_Operator::needs_parens(Supports_Condition_Obj cond) const
44+
bool Supports_Operator::needs_parens(SupportsConditionObj cond) const
4545
{
4646
if (Supports_Operator_Obj op = Cast<Supports_Operator>(cond)) {
4747
return op->operand() != operand();
@@ -52,14 +52,14 @@ namespace Sass {
5252
/////////////////////////////////////////////////////////////////////////
5353
/////////////////////////////////////////////////////////////////////////
5454

55-
Supports_Negation::Supports_Negation(SourceSpan pstate, Supports_Condition_Obj c)
56-
: Supports_Condition(pstate), condition_(c)
55+
Supports_Negation::Supports_Negation(SourceSpan pstate, SupportsConditionObj c)
56+
: SupportsCondition(pstate), condition_(c)
5757
{ }
5858
Supports_Negation::Supports_Negation(const Supports_Negation* ptr)
59-
: Supports_Condition(ptr), condition_(ptr->condition_)
59+
: SupportsCondition(ptr), condition_(ptr->condition_)
6060
{ }
6161

62-
bool Supports_Negation::needs_parens(Supports_Condition_Obj cond) const
62+
bool Supports_Negation::needs_parens(SupportsConditionObj cond) const
6363
{
6464
return Cast<Supports_Negation>(cond) ||
6565
Cast<Supports_Operator>(cond);
@@ -69,15 +69,15 @@ namespace Sass {
6969
/////////////////////////////////////////////////////////////////////////
7070

7171
Supports_Declaration::Supports_Declaration(SourceSpan pstate, ExpressionObj f, ExpressionObj v)
72-
: Supports_Condition(pstate), feature_(f), value_(v)
72+
: SupportsCondition(pstate), feature_(f), value_(v)
7373
{ }
7474
Supports_Declaration::Supports_Declaration(const Supports_Declaration* ptr)
75-
: Supports_Condition(ptr),
75+
: SupportsCondition(ptr),
7676
feature_(ptr->feature_),
7777
value_(ptr->value_)
7878
{ }
7979

80-
bool Supports_Declaration::needs_parens(Supports_Condition_Obj cond) const
80+
bool Supports_Declaration::needs_parens(SupportsConditionObj cond) const
8181
{
8282
return false;
8383
}
@@ -86,14 +86,14 @@ namespace Sass {
8686
/////////////////////////////////////////////////////////////////////////
8787

8888
Supports_Interpolation::Supports_Interpolation(SourceSpan pstate, ExpressionObj v)
89-
: Supports_Condition(pstate), value_(v)
89+
: SupportsCondition(pstate), value_(v)
9090
{ }
9191
Supports_Interpolation::Supports_Interpolation(const Supports_Interpolation* ptr)
92-
: Supports_Condition(ptr),
92+
: SupportsCondition(ptr),
9393
value_(ptr->value_)
9494
{ }
9595

96-
bool Supports_Interpolation::needs_parens(Supports_Condition_Obj cond) const
96+
bool Supports_Interpolation::needs_parens(SupportsConditionObj cond) const
9797
{
9898
return false;
9999
}
@@ -102,7 +102,7 @@ namespace Sass {
102102
/////////////////////////////////////////////////////////////////////////
103103

104104
IMPLEMENT_AST_OPERATORS(SupportsRule);
105-
IMPLEMENT_AST_OPERATORS(Supports_Condition);
105+
IMPLEMENT_AST_OPERATORS(SupportsCondition);
106106
IMPLEMENT_AST_OPERATORS(Supports_Operator);
107107
IMPLEMENT_AST_OPERATORS(Supports_Negation);
108108
IMPLEMENT_AST_OPERATORS(Supports_Declaration);

src/ast_supports.hpp

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ namespace Sass {
4040
// `@supports` rule.
4141
////////////////////
4242
class SupportsRule : public ParentStatement {
43-
ADD_PROPERTY(Supports_Condition_Obj, condition)
43+
ADD_PROPERTY(SupportsConditionObj, condition)
4444
public:
45-
SupportsRule(SourceSpan pstate, Supports_Condition_Obj condition, Block_Obj block = {});
45+
SupportsRule(SourceSpan pstate, SupportsConditionObj condition, Block_Obj block = {});
4646
bool bubbles() override;
4747
ATTACH_AST_OPERATIONS(SupportsRule)
4848
ATTACH_CRTP_PERFORM_METHODS()
@@ -51,67 +51,67 @@ namespace Sass {
5151
//////////////////////////////////////////////////////
5252
// The abstract superclass of all Supports conditions.
5353
//////////////////////////////////////////////////////
54-
class Supports_Condition : public Expression {
54+
class SupportsCondition : public Expression {
5555
public:
56-
Supports_Condition(SourceSpan pstate);
57-
virtual bool needs_parens(Supports_Condition_Obj cond) const { return false; }
58-
ATTACH_AST_OPERATIONS(Supports_Condition)
56+
SupportsCondition(SourceSpan pstate);
57+
virtual bool needs_parens(SupportsConditionObj cond) const { return false; }
58+
ATTACH_AST_OPERATIONS(SupportsCondition)
5959
ATTACH_CRTP_PERFORM_METHODS()
6060
};
6161

6262
////////////////////////////////////////////////////////////
6363
// An operator condition (e.g. `CONDITION1 and CONDITION2`).
6464
////////////////////////////////////////////////////////////
65-
class Supports_Operator : public Supports_Condition {
65+
class Supports_Operator : public SupportsCondition {
6666
public:
6767
enum Operand { AND, OR };
6868
private:
69-
ADD_PROPERTY(Supports_Condition_Obj, left);
70-
ADD_PROPERTY(Supports_Condition_Obj, right);
69+
ADD_PROPERTY(SupportsConditionObj, left);
70+
ADD_PROPERTY(SupportsConditionObj, right);
7171
ADD_PROPERTY(Operand, operand);
7272
public:
73-
Supports_Operator(SourceSpan pstate, Supports_Condition_Obj l, Supports_Condition_Obj r, Operand o);
74-
virtual bool needs_parens(Supports_Condition_Obj cond) const override;
73+
Supports_Operator(SourceSpan pstate, SupportsConditionObj l, SupportsConditionObj r, Operand o);
74+
virtual bool needs_parens(SupportsConditionObj cond) const override;
7575
ATTACH_AST_OPERATIONS(Supports_Operator)
7676
ATTACH_CRTP_PERFORM_METHODS()
7777
};
7878

7979
//////////////////////////////////////////
8080
// A negation condition (`not CONDITION`).
8181
//////////////////////////////////////////
82-
class Supports_Negation : public Supports_Condition {
82+
class Supports_Negation : public SupportsCondition {
8383
private:
84-
ADD_PROPERTY(Supports_Condition_Obj, condition);
84+
ADD_PROPERTY(SupportsConditionObj, condition);
8585
public:
86-
Supports_Negation(SourceSpan pstate, Supports_Condition_Obj c);
87-
virtual bool needs_parens(Supports_Condition_Obj cond) const override;
86+
Supports_Negation(SourceSpan pstate, SupportsConditionObj c);
87+
virtual bool needs_parens(SupportsConditionObj cond) const override;
8888
ATTACH_AST_OPERATIONS(Supports_Negation)
8989
ATTACH_CRTP_PERFORM_METHODS()
9090
};
9191

9292
/////////////////////////////////////////////////////
9393
// A declaration condition (e.g. `(feature: value)`).
9494
/////////////////////////////////////////////////////
95-
class Supports_Declaration : public Supports_Condition {
95+
class Supports_Declaration : public SupportsCondition {
9696
private:
9797
ADD_PROPERTY(ExpressionObj, feature);
9898
ADD_PROPERTY(ExpressionObj, value);
9999
public:
100100
Supports_Declaration(SourceSpan pstate, ExpressionObj f, ExpressionObj v);
101-
virtual bool needs_parens(Supports_Condition_Obj cond) const override;
101+
virtual bool needs_parens(SupportsConditionObj cond) const override;
102102
ATTACH_AST_OPERATIONS(Supports_Declaration)
103103
ATTACH_CRTP_PERFORM_METHODS()
104104
};
105105

106106
///////////////////////////////////////////////
107107
// An interpolation condition (e.g. `#{$var}`).
108108
///////////////////////////////////////////////
109-
class Supports_Interpolation : public Supports_Condition {
109+
class Supports_Interpolation : public SupportsCondition {
110110
private:
111111
ADD_PROPERTY(ExpressionObj, value);
112112
public:
113113
Supports_Interpolation(SourceSpan pstate, ExpressionObj v);
114-
virtual bool needs_parens(Supports_Condition_Obj cond) const override;
114+
virtual bool needs_parens(SupportsConditionObj cond) const override;
115115
ATTACH_AST_OPERATIONS(Supports_Interpolation)
116116
ATTACH_CRTP_PERFORM_METHODS()
117117
};

src/eval.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,8 +1319,8 @@ namespace Sass {
13191319
Expression* right = c->right()->perform(this);
13201320
Supports_Operator* cc = SASS_MEMORY_NEW(Supports_Operator,
13211321
c->pstate(),
1322-
Cast<Supports_Condition>(left),
1323-
Cast<Supports_Condition>(right),
1322+
Cast<SupportsCondition>(left),
1323+
Cast<SupportsCondition>(right),
13241324
c->operand());
13251325
return cc;
13261326
}
@@ -1330,7 +1330,7 @@ namespace Sass {
13301330
Expression* condition = c->condition()->perform(this);
13311331
Supports_Negation* cc = SASS_MEMORY_NEW(Supports_Negation,
13321332
c->pstate(),
1333-
Cast<Supports_Condition>(condition));
1333+
Cast<SupportsCondition>(condition));
13341334
return cc;
13351335
}
13361336

src/expand.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ namespace Sass {
233233
ExpressionObj condition = f->condition()->perform(&eval);
234234
SupportsRuleObj ff = SASS_MEMORY_NEW(SupportsRule,
235235
f->pstate(),
236-
Cast<Supports_Condition>(condition),
236+
Cast<SupportsCondition>(condition),
237237
operator()(f->block()));
238238
return ff.detach();
239239
}

src/operation.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace Sass {
2525
virtual Statement* perform(Operation<Statement*>* op) = 0; \
2626
virtual Expression* perform(Operation<Expression*>* op) = 0; \
2727
virtual union Sass_Value* perform(Operation<union Sass_Value*>* op) = 0; \
28-
virtual Supports_Condition* perform(Operation<Supports_Condition*>* op) = 0; \
28+
virtual SupportsCondition* perform(Operation<SupportsCondition*>* op) = 0; \
2929

3030
// you must add operators to every class
3131
// ensures `this` of actual instance type
@@ -40,7 +40,7 @@ namespace Sass {
4040
virtual Statement* perform(Operation<Statement*>* op) override { return (*op)(this); } \
4141
virtual Expression* perform(Operation<Expression*>* op) override { return (*op)(this); } \
4242
virtual union Sass_Value* perform(Operation<union Sass_Value*>* op) override { return (*op)(this); } \
43-
virtual Supports_Condition* perform(Operation<Supports_Condition*>* op) override { return (*op)(this); } \
43+
virtual SupportsCondition* perform(Operation<SupportsCondition*>* op) override { return (*op)(this); } \
4444

4545
template<typename T>
4646
class Operation {
@@ -94,7 +94,7 @@ namespace Sass {
9494
virtual T operator()(String_Schema* x) = 0;
9595
virtual T operator()(String_Quoted* x) = 0;
9696
virtual T operator()(String_Constant* x) = 0;
97-
virtual T operator()(Supports_Condition* x) = 0;
97+
virtual T operator()(SupportsCondition* x) = 0;
9898
virtual T operator()(Supports_Operator* x) = 0;
9999
virtual T operator()(Supports_Negation* x) = 0;
100100
virtual T operator()(Supports_Declaration* x) = 0;
@@ -180,7 +180,7 @@ namespace Sass {
180180
T operator()(String_Schema* x) { return static_cast<D*>(this)->fallback(x); }
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); }
183-
T operator()(Supports_Condition* x) { return static_cast<D*>(this)->fallback(x); }
183+
T operator()(SupportsCondition* x) { return static_cast<D*>(this)->fallback(x); }
184184
T operator()(Supports_Operator* 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); }

src/output.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ namespace Sass {
203203
{
204204
if (f->is_invisible()) return;
205205

206-
Supports_Condition_Obj c = f->condition();
206+
SupportsConditionObj c = f->condition();
207207
Block_Obj b = f->block();
208208

209209
// Filter out feature blocks that aren't printable (process its children though)

0 commit comments

Comments
 (0)