Skip to content

Commit 2418479

Browse files
committed
Merge pull request #1476 from mgreter/bugfix/propset-evaluation
Enable `Propset` prefix evaluation
2 parents af8365d + 7f5c1cb commit 2418479

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/debugger.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ inline void debug_ast(AST_Node* node, std::string ind = "", Env* env = 0)
515515
std::cerr << " [" << prettyprint(expression->value()) << "]";
516516
if (expression->is_delayed()) std::cerr << " [delayed]";
517517
if (expression->sass_fix_1291()) std::cerr << " [sass_fix_1291]";
518+
if (expression->is_interpolant()) std::cerr << " [interpolant]";
518519
if (expression->quote_mark()) std::cerr << " [quote_mark: " << expression->quote_mark() << "]";
519520
std::cerr << " <" << prettyprint(expression->pstate().token.ws_before()) << ">" << std::endl;
520521
} else if (dynamic_cast<String_Constant*>(node)) {
@@ -527,13 +528,15 @@ inline void debug_ast(AST_Node* node, std::string ind = "", Env* env = 0)
527528
std::cerr << " [" << prettyprint(expression->value()) << "]";
528529
if (expression->is_delayed()) std::cerr << " [delayed]";
529530
if (expression->sass_fix_1291()) std::cerr << " [sass_fix_1291]";
531+
if (expression->is_interpolant()) std::cerr << " [interpolant]";
530532
std::cerr << " <" << prettyprint(expression->pstate().token.ws_before()) << ">" << std::endl;
531533
} else if (dynamic_cast<String_Schema*>(node)) {
532534
String_Schema* expression = dynamic_cast<String_Schema*>(node);
533535
std::cerr << ind << "String_Schema " << expression;
534536
std::cerr << " " << expression->concrete_type();
535537
if (expression->is_delayed()) std::cerr << " [delayed]";
536538
if (expression->has_interpolants()) std::cerr << " [has_interpolants]";
539+
if (expression->is_interpolant()) std::cerr << " [interpolant]";
537540
std::cerr << " <" << prettyprint(expression->pstate().token.ws_before()) << ">" << std::endl;
538541
for(auto i : expression->elements()) { debug_ast(i, ind + " ", env); }
539542
} else if (dynamic_cast<String*>(node)) {
@@ -542,6 +545,7 @@ inline void debug_ast(AST_Node* node, std::string ind = "", Env* env = 0)
542545
std::cerr << " " << expression->concrete_type();
543546
std::cerr << " (" << pstate_source_position(node) << ")";
544547
if (expression->sass_fix_1291()) std::cerr << " [sass_fix_1291]";
548+
if (expression->is_interpolant()) std::cerr << " [interpolant]";
545549
std::cerr << " <" << prettyprint(expression->pstate().token.ws_before()) << ">" << std::endl;
546550
} else if (dynamic_cast<Expression*>(node)) {
547551
Expression* expression = dynamic_cast<Expression*>(node);

src/expand.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ namespace Sass {
121121
if (Declaration* dec = static_cast<Declaration*>(stm)) {
122122
String_Schema* combined_prop = new (ctx.mem) String_Schema(p->pstate());
123123
if (!property_stack.empty()) {
124-
*combined_prop << property_stack.back()
124+
*combined_prop << property_stack.back()->perform(&eval)
125125
<< new (ctx.mem) String_Quoted(p->pstate(), "-")
126126
<< dec->property(); // TODO: eval the prop into a string constant
127127
}

0 commit comments

Comments
 (0)