Skip to content

Commit ff4391f

Browse files
committed
Merge pull request #2089 from xzyfer/feat/make-it-rain
Implement the Trace AST node
2 parents 6e4409e + 634e74c commit ff4391f

18 files changed

+484
-148
lines changed

src/ast.hpp

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -481,18 +481,6 @@ namespace Sass {
481481
ATTACH_OPERATIONS()
482482
};
483483

484-
/////////////////////////////////////////////////////////
485-
// Nested declaration sets (i.e., namespaced properties).
486-
/////////////////////////////////////////////////////////
487-
class Propset : public Has_Block {
488-
ADD_PROPERTY(String*, property_fragment)
489-
public:
490-
Propset(ParserState pstate, String* pf, Block* b = 0)
491-
: Has_Block(pstate, b), property_fragment_(pf)
492-
{ }
493-
ATTACH_OPERATIONS()
494-
};
495-
496484
/////////////////
497485
// Bubble.
498486
/////////////////
@@ -580,15 +568,15 @@ namespace Sass {
580568
////////////////////////////////////////////////////////////////////////
581569
// Declarations -- style rules consisting of a property name and values.
582570
////////////////////////////////////////////////////////////////////////
583-
class Declaration : public Statement {
571+
class Declaration : public Has_Block {
584572
ADD_PROPERTY(String*, property)
585573
ADD_PROPERTY(Expression*, value)
586574
ADD_PROPERTY(bool, is_important)
587575
ADD_PROPERTY(bool, is_indented)
588576
public:
589577
Declaration(ParserState pstate,
590-
String* prop, Expression* val, bool i = false)
591-
: Statement(pstate), property_(prop), value_(val), is_important_(i), is_indented_(false)
578+
String* prop, Expression* val, bool i = false, Block* b = 0)
579+
: Has_Block(pstate, b), property_(prop), value_(val), is_important_(i), is_indented_(false)
592580
{ statement_type(DECLARATION); }
593581
ATTACH_OPERATIONS()
594582
};

src/ast_factory.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ namespace Sass {
1313
// statements
1414
Block* new_Block(std::string p, size_t l, size_t s = 0, bool r = false);
1515
Ruleset* new_Ruleset(std::string p, size_t l, Selector* s, Block* b);
16-
Propset* new_Propset(std::string p, size_t l, String* pf, Block* b);
1716
Supports_Query* new_Supports_Query(std::string p, size_t l, Supports_Query* f, Block* b);
1817
Media_Query* new_Media_Query(std::string p, size_t l, List* q, Block* b);
1918
At_Root_Block* new_At_Root_Block(std::string p, size_t l, Selector* sel, Block* b);
2019
Directive* new_At_Rule(std::string p, size_t l, std::string kwd, Selector* sel, Block* b);
2120
Keyframe_Rule* new_Keyframe_Rule(std::string p, size_t l, Block* b);
22-
Declaration* new_Declaration(std::string p, size_t l, String* prop, List* vals);
21+
Declaration* new_Declaration(std::string p, size_t l, String* prop, List* vals, Block* b);
2322
Assignment* new_Assignment(std::string p, size_t l, std::string var, Expression* val, bool guarded = false);
2423
Import<Function_Call*>* new_CSS_Import(std::string p, size_t l, Function_Call* loc);
2524
Import<String*>* new_SASS_Import(std::string p, size_t l, String* loc);

src/ast_fwd_decl.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ namespace Sass {
1111
class Statement;
1212
class Block;
1313
class Ruleset;
14-
class Propset;
1514
class Bubble;
1615
class Trace;
1716
class Media_Block;

0 commit comments

Comments
 (0)