Make SassFormatException implement SourceSpanFormatException (#891)

This commit is contained in:
Natalie Weizenbaum 2019-11-25 18:54:45 -08:00 committed by GitHub
parent 9635a523b7
commit 15be59be31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 3 deletions

View File

@ -1,4 +1,4 @@
## 1.23.8
## 1.24.0
* **Potentially breaking bug fix:** Members loaded through a nested `@import`
are no longer ever accessible outside that nested context.
@ -7,6 +7,11 @@
the same name. The latter name now takes precedence over the former, as per
the specification.
### Dart API
* `SassFormatException` now implements `SourceSpanFormatException` (and thus
`FormatException`).
## 1.23.7
* No user-visible changes.

View File

@ -86,7 +86,8 @@ class SassRuntimeException extends SassException {
}
/// An exception thrown when Sass parsing has failed.
class SassFormatException extends SassException {
class SassFormatException extends SassException
implements SourceSpanFormatException {
String get source => span.file.getText(0);
int get offset => span.start.offset;

View File

@ -1,5 +1,5 @@
name: sass
version: 1.23.8-dev
version: 1.24.0-dev
description: A Sass implementation in Dart.
author: Sass Team
homepage: https://github.com/sass/dart-sass