Skip to content

Commit

Permalink
Strict parser issue
Browse files Browse the repository at this point in the history
  • Loading branch information
wkillerud committed Jan 4, 2025
1 parent 22d7501 commit 583a6f2
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,22 @@ void main() {
ls.cache.clear();
});

// TODO: The parser throws if the stylesheet is not valid which makes implementing completions a bit tricky.
// Error: Expected expression.
// ╷
// 2 │ display: ;
// │ ^
// ╵
// - 2:12 root stylesheet
// package:sass/src/utils.dart 428:3 throwWithTrace
// package:sass/src/parse/parser.dart 732:7 Parser.wrapSpanFormatException
// package:sass/src/parse/stylesheet.dart 86:12 StylesheetParser.parse
// package:sass/src/ast/sass/statement/stylesheet.dart 134:38 new Stylesheet.parseScss
// package:sass_language_services/src/language_services_cache.dart 35:38 LanguageServicesCache.getStylesheet
// package:sass_language_services/src/language_services.dart 106:18 LanguageServices.parseStylesheet
// package:sass_language_services/src/features/completion/completion_feature.dart 52:25 CompletionFeature.doComplete
// package:sass_language_services/src/language_services.dart 61:24 LanguageServices.doComplete
// test/features/completion/completion_test.dart 94:29 main.<fn>.<fn>
test('in an empty style rule', () async {
var document = fs.createDocument(r'''
.a {
Expand Down

0 comments on commit 583a6f2

Please sign in to comment.