Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2948 from nschonni/fix--Update-"call"-parameter-t…
Browse files Browse the repository at this point in the history
…o-$function

fix: Update "call" parameter to $function
  • Loading branch information
nschonni authored Jul 19, 2019
2 parents ac338df + d5d30da commit 1587a2a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/fn_miscs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,21 @@ namespace Sass {
return SASS_MEMORY_NEW(Boolean, pstate, features->find(s) != features->end());
}

Signature call_sig = "call($name, $args...)";
Signature call_sig = "call($function, $args...)";
BUILT_IN(call)
{
std::string name;
Function* ff = Cast<Function>(env["$name"]);
String_Constant* ss = Cast<String_Constant>(env["$name"]);
std::string function;
Function* ff = Cast<Function>(env["$function"]);
String_Constant* ss = Cast<String_Constant>(env["$function"]);

if (ss) {
name = Util::normalize_underscores(unquote(ss->value()));
function = Util::normalize_underscores(unquote(ss->value()));
std::cerr << "DEPRECATION WARNING: ";
std::cerr << "Passing a string to call() is deprecated and will be illegal" << std::endl;
std::cerr << "in Sass 4.0. Use call(get-function(" + quote(name) + ")) instead." << std::endl;
std::cerr << "in Sass 4.0. Use call(get-function(" + quote(function) + ")) instead." << std::endl;
std::cerr << std::endl;
} else if (ff) {
name = ff->name();
function = ff->name();
}

List_Obj arglist = SASS_MEMORY_COPY(ARG("$args", List));
Expand Down Expand Up @@ -135,7 +135,7 @@ namespace Sass {
args->append(SASS_MEMORY_NEW(Argument, pstate, expr));
}
}
Function_Call_Obj func = SASS_MEMORY_NEW(Function_Call, pstate, name, args);
Function_Call_Obj func = SASS_MEMORY_NEW(Function_Call, pstate, function, args);

Expand expand(ctx, &d_env, &selector_stack, &original_stack);
func->via_call(true); // calc invoke is allowed
Expand Down

0 comments on commit 1587a2a

Please sign in to comment.