Stop using deprecated SourceSpan ctor
diff --git a/lib/css.dart b/lib/css.dart
index e7ef534..65f6511 100644
--- a/lib/css.dart
+++ b/lib/css.dart
@@ -35,7 +35,7 @@
// Read the file.
var filename = path.basename(inputPath);
var contents = new File(inputPath).readAsStringSync();
- var file = new SourceFile(contents, url: path.toUri(inputPath));
+ var file = new SourceFile.fromString(contents, url: path.toUri(inputPath));
// Parse the CSS.
StyleSheet tree = _time(
diff --git a/lib/parser.dart b/lib/parser.dart
index 32e27f5..db2068c 100644
--- a/lib/parser.dart
+++ b/lib/parser.dart
@@ -68,7 +68,7 @@
_createMessages(errors: errors, options: options);
- var file = new SourceFile(source);
+ var file = new SourceFile.fromString(source);
var tree = new _Parser(file, source).parse();
@@ -99,7 +99,7 @@
_createMessages(errors: errors, options: options);
- var file = new SourceFile(source);
+ var file = new SourceFile.fromString(source);
return new _Parser(file, source).parse();
}
@@ -114,7 +114,7 @@
_createMessages(errors: errors);
- var file = new SourceFile(source);
+ var file = new SourceFile.fromString(source);
return (new _Parser(file, source)..tokenizer.inSelector = true)
.parseSelector();
}
@@ -124,7 +124,7 @@
_createMessages(errors: errors);
- var file = new SourceFile(source);
+ var file = new SourceFile.fromString(source);
return (new _Parser(file, source)
// TODO(jmesserly): this fix should be applied to the parser. It's tricky
// because by the time the flag is set one token has already been fetched.
diff --git a/pubspec.yaml b/pubspec.yaml
index 225b601..221d92b 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -9,7 +9,7 @@
args: '>=0.9.0 <0.14.0'
logging: '>=0.9.0 <0.12.0'
path: '>=0.9.0 <2.0.0'
- source_span: '>=1.0.0 <2.0.0'
+ source_span: '>=1.4.0 <2.0.0'
dev_dependencies:
browser: '>=0.9.0 <0.11.0'
test: '>=0.12.0 <0.13.0'