Skip to content

Commit f5b02c9

Browse files
committed
Merge pull request #1953 from sass/revert-1870-revert/error-check-for-extend
Revert "Disable error check for extend placement check"
2 parents 67fde91 + 309fd34 commit f5b02c9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/parser.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,7 @@ namespace Sass {
221221
}
222222

223223
else if (lex < kwd_extend >(true)) {
224-
Scope parent = stack.empty() ? Scope::Rules : stack.back();
225-
if (parent == Scope::Root) {
224+
if (block->is_root()) {
226225
error("Extend directives may only be used within rules.", pstate);
227226
}
228227

@@ -2145,7 +2144,6 @@ namespace Sass {
21452144
Block* body = 0;
21462145
At_Root_Expression* expr = 0;
21472146
Lookahead lookahead_result;
2148-
// stack.push_back(Scope::Root);
21492147
LOCAL_FLAG(in_at_root, true);
21502148
if (lex< exactly<'('> >()) {
21512149
expr = parse_at_root_expression();
@@ -2160,7 +2158,6 @@ namespace Sass {
21602158
}
21612159
At_Root_Block* at_root = SASS_MEMORY_NEW(ctx.mem, At_Root_Block, at_source_position, body);
21622160
if (expr) at_root->expression(expr);
2163-
// stack.pop_back();
21642161
return at_root;
21652162
}
21662163

0 commit comments

Comments
 (0)