This repository was archived by the owner on Oct 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -599,14 +599,26 @@ namespace Sass {
599599
600600 // behave according to as ruby sass (add leading zero)
601601 if (value->concrete_type () == Expression::NUMBER) {
602- Number* n = static_cast <Number*>(value);
603- value = new (ctx.mem ) Number (*n);
602+ value = new (ctx.mem ) Number (*static_cast <Number*>(value));
604603 static_cast <Number*>(value)->zero (true );
605604 }
606605 else if (value->concrete_type () == Expression::STRING) {
607- String_Constant* s = static_cast <String_Constant*>(value);
608- value = new (ctx.mem ) String_Constant (s->pstate (),
609- s->value ());
606+ value = new (ctx.mem ) String_Constant (*static_cast <String_Constant*>(value));
607+ }
608+ else if (value->concrete_type () == Expression::LIST) {
609+ value = new (ctx.mem ) List (*static_cast <List*>(value));
610+ }
611+ else if (value->concrete_type () == Expression::MAP) {
612+ value = new (ctx.mem ) Map (*static_cast <Map*>(value));
613+ }
614+ else if (value->concrete_type () == Expression::BOOLEAN) {
615+ value = new (ctx.mem ) Boolean (*static_cast <Boolean*>(value));
616+ }
617+ else if (value->concrete_type () == Expression::COLOR) {
618+ value = new (ctx.mem ) Color (*static_cast <Color*>(value));
619+ }
620+ else if (value->concrete_type () == Expression::NULL_VAL) {
621+ value = new (ctx.mem ) Null (value->pstate ());
610622 }
611623
612624 // cerr << "\ttype is now: " << typeid(*value).name() << endl << endl;
You can’t perform that action at this time.
0 commit comments