5050
5151namespace Sass {
5252
53+ // easier to search with name
54+ const bool DELAYED = true ;
55+
5356 // ToDo: should this really be hardcoded
5457 // Note: most methods follow precision option
5558 const double NUMBER_EPSILON = 0.00000000000001 ;
@@ -67,7 +70,8 @@ namespace Sass {
6770 bool ws_after;
6871 };
6972
70- // from boost (functional/hash):
73+ // ////////////////////////////////////////////////////////
74+ // `hash_combine` comes from boost (functional/hash):
7175 // http://www.boost.org/doc/libs/1_35_0/doc/html/hash/combine.html
7276 // Boost Software License - Version 1.0
7377 // http://www.boost.org/users/license.html
@@ -77,6 +81,7 @@ namespace Sass {
7781 seed ^= std::hash<T>()(val) + 0x9e3779b9
7882 + (seed<<6 ) + (seed>>2 );
7983 }
84+ // ////////////////////////////////////////////////////////
8085
8186 // ////////////////////////////////////////////////////////
8287 // Abstract base class for all abstract syntax tree nodes.
@@ -391,7 +396,7 @@ namespace Sass {
391396 ADD_PROPERTY (bool , group_end)
392397 public:
393398 Statement (ParserState pstate, Statement_Type st = NONE, size_t t = 0 )
394- : AST_Node(pstate), statement_type_(st), tabs_(t), group_end_(false )
399+ : AST_Node(pstate), block_( 0 ), statement_type_(st), tabs_(t), group_end_(false )
395400 { }
396401 virtual ~Statement () = 0 ;
397402 // needed for rearranging nested rulesets during CSS emission
@@ -905,9 +910,8 @@ namespace Sass {
905910
906911 virtual void set_delayed (bool delayed)
907912 {
908- for (size_t i = 0 , L = length (); i < L; ++i)
909- (elements ()[i])->set_delayed (delayed);
910913 is_delayed (delayed);
914+ // don't set children
911915 }
912916
913917 virtual bool operator == (const Expression& rhs) const ;
@@ -1031,12 +1035,6 @@ namespace Sass {
10311035 return is_left_interpolant () ||
10321036 is_right_interpolant ();
10331037 }
1034- virtual bool can_delay () const ;
1035- void reset_whitespace ()
1036- {
1037- op_.ws_before = false ;
1038- op_.ws_after = false ;
1039- }
10401038 virtual void set_delayed (bool delayed)
10411039 {
10421040 right ()->set_delayed (delayed);
@@ -1138,6 +1136,7 @@ namespace Sass {
11381136 }
11391137 }
11401138
1139+ virtual void set_delayed (bool delayed);
11411140 virtual bool operator ==(const Expression& rhs) const
11421141 {
11431142 try
@@ -1185,6 +1184,8 @@ namespace Sass {
11851184 has_keyword_argument_(false )
11861185 { }
11871186
1187+ virtual void set_delayed (bool delayed);
1188+
11881189 Argument* get_rest_argument ();
11891190 Argument* get_keyword_argument ();
11901191
@@ -1296,7 +1297,7 @@ namespace Sass {
12961297 size_t hash_;
12971298 public:
12981299 Textual (ParserState pstate, Type t, std::string val)
1299- : Expression(pstate, true ), type_(t), value_(val),
1300+ : Expression(pstate, DELAYED ), type_(t), value_(val),
13001301 hash_ (0 )
13011302 { }
13021303
@@ -1466,10 +1467,9 @@ namespace Sass {
14661467 // "flat" strings.
14671468 // //////////////////////////////////////////////////////////////////////
14681469 class String : public Value {
1469- ADD_PROPERTY (bool , sass_fix_1291)
14701470 public:
1471- String (ParserState pstate, bool delayed = false , bool sass_fix_1291 = false )
1472- : Value(pstate, delayed), sass_fix_1291_(sass_fix_1291)
1471+ String (ParserState pstate, bool delayed = false )
1472+ : Value(pstate, delayed)
14731473 { concrete_type (STRING); }
14741474 static std::string type_name () { return " string" ; }
14751475 virtual ~String () = 0 ;
@@ -1517,6 +1517,10 @@ namespace Sass {
15171517 return hash_;
15181518 }
15191519
1520+ virtual void set_delayed (bool delayed) {
1521+ is_delayed (delayed);
1522+ }
1523+
15201524 virtual bool operator ==(const Expression& rhs) const ;
15211525
15221526 ATTACH_OPERATIONS ()
0 commit comments