diff --git a/src/parser/scssParser.ts b/src/parser/scssParser.ts index 7ec1d008..ab5cfa3f 100644 --- a/src/parser/scssParser.ts +++ b/src/parser/scssParser.ts @@ -118,6 +118,9 @@ export class SCSSParser extends cssParser.Parser { public _parseKeyframeSelector(): nodes.Node | null { return this._tryParseKeyframeSelector() || this._parseControlStatement(this._parseKeyframeSelector.bind(this)) + || this._parseWarnAndDebug() // @warn, @debug and @error statements + || this._parseMixinReference() // @include + || this._parseFunctionDeclaration() // @function || this._parseVariableDeclaration() || this._parseMixinContent(); } diff --git a/src/test/scss/parser.test.ts b/src/test/scss/parser.test.ts index f17874ad..c9efe74f 100644 --- a/src/test/scss/parser.test.ts +++ b/src/test/scss/parser.test.ts @@ -387,6 +387,8 @@ suite('SCSS - Parser', () => { assertNode('@keyframes test-keyframe { @for $i from 1 through 60 { $s: ($i * 100) / 60 + "%"; } }', parser, parser._parseKeyframe.bind(parser)); assertNode('@keyframes name { @for $i from 0 through m.$steps { #{$i * (100%/$steps)} { transform: $rotate $translate; } } }', parser, parser._parseKeyframe.bind(parser)); + assertNode('@keyframes name { @function bar() { } }', parser, parser._parseKeyframe.bind(parser)); // #197742 + assertNode('@keyframes name { @include keyframe-mixin(); }', parser, parser._parseKeyframe.bind(parser)); // #197742 }); test('@extend', function () {