Skip to content

Commit e83064c

Browse files
committed
Merge pull request #2064 from xzyfer/feat/cleanup-check-nesting
Clean up some dead code in check nesting
2 parents d8fb898 + 54b2390 commit e83064c

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

src/check_nesting.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@
22
#include <vector>
33

44
#include "check_nesting.hpp"
5-
#include "context.hpp"
6-
// #include "debugger.hpp"
75

86
namespace Sass {
97

10-
CheckNesting::CheckNesting(Context& ctx)
11-
: ctx(ctx),
12-
parent_stack(std::vector<AST_Node*>())
8+
CheckNesting::CheckNesting()
9+
: parent_stack(std::vector<AST_Node*>())
1310
{ }
1411

1512
AST_Node* CheckNesting::parent()

src/check_nesting.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#define SASS_CHECK_NESTING_H
33

44
#include "ast.hpp"
5-
#include "context.hpp"
65
#include "operation.hpp"
76

87
namespace Sass {
@@ -11,16 +10,14 @@ namespace Sass {
1110

1211
class CheckNesting : public Operation_CRTP<Statement*, CheckNesting> {
1312

14-
Context& ctx;
15-
std::vector<Block*> block_stack;
1613
std::vector<AST_Node*> parent_stack;
1714

1815
AST_Node* parent();
1916

2017
Statement* fallback_impl(AST_Node* n);
2118

2219
public:
23-
CheckNesting(Context&);
20+
CheckNesting();
2421
~CheckNesting() { }
2522

2623
Statement* operator()(Block*);

src/context.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,13 +649,13 @@ namespace Sass {
649649
// create crtp visitor objects
650650
Expand expand(*this, &global, &backtrace);
651651
Cssize cssize(*this, &backtrace);
652-
CheckNesting check_nesting(*this);
652+
CheckNesting check_nesting;
653653
// check nesting
654-
root = root->perform(&check_nesting)->block();
654+
root->perform(&check_nesting)->block();
655655
// expand and eval the tree
656656
root = root->perform(&expand)->block();
657657
// check nesting
658-
root = root->perform(&check_nesting)->block();
658+
root->perform(&check_nesting)->block();
659659
// merge and bubble certain rules
660660
root = root->perform(&cssize)->block();
661661
// should we extend something?

0 commit comments

Comments
 (0)