@@ -1471,6 +1471,9 @@ namespace Sass {
14711471 { concrete_type (STRING); }
14721472 static std::string type_name () { return " string" ; }
14731473 virtual ~String () = 0 ;
1474+ virtual void rtrim () = 0;
1475+ virtual void ltrim () = 0;
1476+ virtual void trim () = 0;
14741477 virtual bool operator ==(const Expression& rhs) const = 0 ;
14751478 ATTACH_OPERATIONS ()
14761479 };
@@ -1499,6 +1502,9 @@ namespace Sass {
14991502 }
15001503 return false ;
15011504 }
1505+ virtual void rtrim ();
1506+ virtual void ltrim ();
1507+ virtual void trim ();
15021508
15031509 virtual size_t hash ()
15041510 {
@@ -1539,6 +1545,9 @@ namespace Sass {
15391545 std::string type () { return " string" ; }
15401546 static std::string type_name () { return " string" ; }
15411547 virtual bool is_invisible () const ;
1548+ virtual void rtrim ();
1549+ virtual void ltrim ();
1550+ virtual void trim ();
15421551
15431552 virtual size_t hash ()
15441553 {
@@ -1698,40 +1707,13 @@ namespace Sass {
16981707 // ///////////////////////////////////////////////
16991708 class At_Root_Query : public Expression {
17001709 private:
1701- ADD_PROPERTY (String *, feature)
1710+ ADD_PROPERTY (Expression *, feature)
17021711 ADD_PROPERTY (Expression*, value)
1703- ADD_PROPERTY (bool , is_interpolated)
17041712 public:
1705- At_Root_Query (ParserState pstate, String * f = 0 , Expression* v = 0 , bool i = false )
1706- : Expression(pstate), feature_(f), value_(v), is_interpolated_(i)
1713+ At_Root_Query (ParserState pstate, Expression * f = 0 , Expression* v = 0 , bool i = false )
1714+ : Expression(pstate), feature_(f), value_(v)
17071715 { }
1708- bool exclude (std::string str)
1709- {
1710- bool with = feature () && unquote (feature ()->to_string ()).compare (" with" ) == 0 ;
1711- List* l = static_cast <List*>(value ());
1712- std::string v;
1713-
1714- if (with)
1715- {
1716- if (!l || l->length () == 0 ) return str.compare (" rule" ) != 0 ;
1717- for (size_t i = 0 , L = l->length (); i < L; ++i)
1718- {
1719- v = unquote ((*l)[i]->to_string ());
1720- if (v.compare (" all" ) == 0 || v == str) return false ;
1721- }
1722- return true ;
1723- }
1724- else
1725- {
1726- if (!l || !l->length ()) return str.compare (" rule" ) == 0 ;
1727- for (size_t i = 0 , L = l->length (); i < L; ++i)
1728- {
1729- v = unquote ((*l)[i]->to_string ());
1730- if (v.compare (" all" ) == 0 || v == str) return true ;
1731- }
1732- return false ;
1733- }
1734- }
1716+ bool exclude (std::string str);
17351717 ATTACH_OPERATIONS ()
17361718 };
17371719
0 commit comments