From d5d30da1398137bd31725c164160fe8d563393fa Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Wed, 17 Jul 2019 19:29:12 -0400 Subject: [PATCH] fix: Update "call" parameter to $function See https://github.com/sass/sass-spec/pull/1442 Closes 2941 --- src/fn_miscs.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/fn_miscs.cpp b/src/fn_miscs.cpp index a81e6a5bd..e4c72dabc 100644 --- a/src/fn_miscs.cpp +++ b/src/fn_miscs.cpp @@ -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(env["$name"]); - String_Constant* ss = Cast(env["$name"]); + std::string function; + Function* ff = Cast(env["$function"]); + String_Constant* ss = Cast(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)); @@ -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