@@ -734,11 +734,14 @@ namespace Sass {
734734 }
735735 else if (value->concrete_type () == Expression::STRING) {
736736 if (auto str = dynamic_cast <String_Quoted*>(value)) {
737+ TRACEINST (str) << " dynamic_cast to String_Quoted worked " << str;
737738 value = new (ctx.mem ) String_Quoted (*str);
738739 } else if (auto str = dynamic_cast <String_Constant*>(value)) {
739740 if (str->quote_mark ()) {
741+ TRACEINST (str) << " dynamic_cast to String_Quoted did not work, but we have quote " << str;
740742 value = new (ctx.mem ) String_Quoted (str->pstate (), str->perform (&to_string));
741743 } else {
744+ TRACEINST (str) << " dynamic_cast to String_Quoted did not work, we are String_Constant " << str;
742745 value = new (ctx.mem ) String_Constant (str->pstate (), unquote (str->value ()));
743746 }
744747 }
@@ -856,18 +859,26 @@ namespace Sass {
856859
857860 string Eval::interpolation (Expression* s) {
858861 if (String_Quoted* str_quoted = dynamic_cast <String_Quoted*>(s)) {
862+ TRACEINST (str_quoted) << " dynamic_cast to String_Quoted worked " << str_quoted;
859863 if (str_quoted->quote_mark ()) {
860864 if (str_quoted->quote_mark () == ' *' || str_quoted->is_delayed ()) {
865+ TRACEINST (str_quoted) << " ... will do interpolation()" ;
861866 return interpolation (new (ctx.mem ) String_Constant (*str_quoted));
862867 } else {
868+ TRACEINST (str_quoted) << " ... will string_escape()" ;
863869 return string_escape (quote (str_quoted->value (), str_quoted->quote_mark ()));
864870 }
865871 } else {
872+ TRACEINST (str_quoted) << " dynamic_cast to String_Quoted failed, will evacuate_escapes()" ;
866873 return evacuate_escapes (str_quoted->value ());
867874 }
868875 } else if (String_Constant* str_constant = dynamic_cast <String_Constant*>(s)) {
876+ TRACEINST (str_constant) << " dynamic_cast to String_Constant worked" ;
869877 string str = str_constant->value ();
870- if (!str_constant->quote_mark ()) str = unquote (str);
878+ if (!str_constant->quote_mark ()) {
879+ TRACEINST (str_constant) << " ... but still need to unquote()" ;
880+ str = unquote (str);
881+ }
871882 return evacuate_escapes (str);
872883 } else if (String_Schema* str_schema = dynamic_cast <String_Schema*>(s)) {
873884 string res = " " ;
@@ -1011,14 +1022,22 @@ namespace Sass {
10111022 Expression* feature = e->feature ();
10121023 feature = (feature ? feature->perform (this ) : 0 );
10131024 if (feature && dynamic_cast <String_Quoted*>(feature)) {
1025+ String_Quoted *qfeature = dynamic_cast <String_Quoted*>(feature);
1026+ TRACEINST (qfeature) << " dynamic_cast to String_Quoted worked " << qfeature;
10141027 feature = new (ctx.mem ) String_Constant (feature->pstate (),
10151028 dynamic_cast <String_Quoted*>(feature)->value ());
1029+ } else {
1030+ TRACEINST (feature) << " dynamic_cast to String_Quoted did not work for " << feature;
10161031 }
10171032 Expression* value = e->value ();
10181033 value = (value ? value->perform (this ) : 0 );
10191034 if (value && dynamic_cast <String_Quoted*>(value)) {
1035+ String_Quoted *qvalue = dynamic_cast <String_Quoted*>(value);
1036+ TRACEINST (qvalue) << " dynamic_cast to String_Quoted worked " << qvalue;
10201037 value = new (ctx.mem ) String_Constant (value->pstate (),
10211038 dynamic_cast <String_Quoted*>(value)->value ());
1039+ } else {
1040+ TRACEINST (value) << " dynamic_cast to String_Quoted did not work for " << value;
10221041 }
10231042 return new (ctx.mem ) Media_Query_Expression (e->pstate (),
10241043 feature,
0 commit comments