Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the Trace AST node #2089

Merged
merged 5 commits into from
May 20, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions src/ast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,18 +481,6 @@ namespace Sass {
ATTACH_OPERATIONS()
};

/////////////////////////////////////////////////////////
// Nested declaration sets (i.e., namespaced properties).
/////////////////////////////////////////////////////////
class Propset : public Has_Block {
ADD_PROPERTY(String*, property_fragment)
public:
Propset(ParserState pstate, String* pf, Block* b = 0)
: Has_Block(pstate, b), property_fragment_(pf)
{ }
ATTACH_OPERATIONS()
};

/////////////////
// Bubble.
/////////////////
Expand Down Expand Up @@ -580,15 +568,15 @@ namespace Sass {
////////////////////////////////////////////////////////////////////////
// Declarations -- style rules consisting of a property name and values.
////////////////////////////////////////////////////////////////////////
class Declaration : public Statement {
class Declaration : public Has_Block {
ADD_PROPERTY(String*, property)
ADD_PROPERTY(Expression*, value)
ADD_PROPERTY(bool, is_important)
ADD_PROPERTY(bool, is_indented)
public:
Declaration(ParserState pstate,
String* prop, Expression* val, bool i = false)
: Statement(pstate), property_(prop), value_(val), is_important_(i), is_indented_(false)
String* prop, Expression* val, bool i = false, Block* b = 0)
: Has_Block(pstate, b), property_(prop), value_(val), is_important_(i), is_indented_(false)
{ statement_type(DECLARATION); }
ATTACH_OPERATIONS()
};
Expand Down
3 changes: 1 addition & 2 deletions src/ast_factory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ namespace Sass {
// statements
Block* new_Block(std::string p, size_t l, size_t s = 0, bool r = false);
Ruleset* new_Ruleset(std::string p, size_t l, Selector* s, Block* b);
Propset* new_Propset(std::string p, size_t l, String* pf, Block* b);
Supports_Query* new_Supports_Query(std::string p, size_t l, Supports_Query* f, Block* b);
Media_Query* new_Media_Query(std::string p, size_t l, List* q, Block* b);
At_Root_Block* new_At_Root_Block(std::string p, size_t l, Selector* sel, Block* b);
Directive* new_At_Rule(std::string p, size_t l, std::string kwd, Selector* sel, Block* b);
Keyframe_Rule* new_Keyframe_Rule(std::string p, size_t l, Block* b);
Declaration* new_Declaration(std::string p, size_t l, String* prop, List* vals);
Declaration* new_Declaration(std::string p, size_t l, String* prop, List* vals, Block* b);
Assignment* new_Assignment(std::string p, size_t l, std::string var, Expression* val, bool guarded = false);
Import<Function_Call*>* new_CSS_Import(std::string p, size_t l, Function_Call* loc);
Import<String*>* new_SASS_Import(std::string p, size_t l, String* loc);
Expand Down
1 change: 0 additions & 1 deletion src/ast_fwd_decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace Sass {
class Statement;
class Block;
class Ruleset;
class Propset;
class Bubble;
class Trace;
class Media_Block;
Expand Down
Loading