File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ namespace Sass {
200
200
201
201
// abort if we are in function context and have nothing parsed yet
202
202
else if (stack.back () == Scope::Function) {
203
- error (" Functions can only contain variable declarations and control directives" , pstate);
203
+ error (" Functions can only contain variable declarations and control directives. " , pstate);
204
204
}
205
205
206
206
// parse imports to process later
@@ -340,7 +340,12 @@ namespace Sass {
340
340
{
341
341
Scope parent = stack.empty () ? Scope::Rules : stack.back ();
342
342
if (parent != Scope::Root && parent != Scope::Rules && parent != Scope::Function) {
343
- error (" Functions may not be defined within control directives or other mixins." , pstate);
343
+ if (which_type == Definition::FUNCTION) {
344
+ error (" Functions may not be defined within control directives or other mixins." , pstate);
345
+ } else {
346
+ error (" Mixins may not be defined within control directives or other mixins." , pstate);
347
+ }
348
+
344
349
}
345
350
std::string which_str (lexed);
346
351
if (!lex< identifier >()) error (" invalid name in " + which_str + " definition" , pstate);
You can’t perform that action at this time.
0 commit comments