mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-30 04:39:03 +01:00
Produce a better error message for unclosed style rules (#586)
Closes #577
This commit is contained in:
parent
b102dc496a
commit
a81017275a
@ -6,6 +6,9 @@
|
||||
next token that wasn't what was expected, they point *after* the previous
|
||||
token. This should generally provide more context for the syntax error.
|
||||
|
||||
* Produce a better error message for style rules that are missing the closing
|
||||
`}`.
|
||||
|
||||
### Command-Line Interface
|
||||
|
||||
* Passing a directory on the command line now compiles all Sass source files in
|
||||
|
@ -253,6 +253,8 @@ abstract class StylesheetParser extends Parser {
|
||||
var wasInStyleRule = _inStyleRule;
|
||||
_inStyleRule = true;
|
||||
|
||||
if (buffer.isEmpty) scanner.error('expected "}".');
|
||||
|
||||
return _withChildren(_statement, start, (children, span) {
|
||||
if (indented && children.isEmpty) {
|
||||
warn("This selector doesn't have any properties and won't be rendered.",
|
||||
|
Loading…
Reference in New Issue
Block a user