Support the latest version of the analyzer package (#1115)

This commit is contained in:
Natalie Weizenbaum 2020-10-14 14:10:46 -07:00 committed by GitHub
parent ab834e955b
commit 73ebf92e9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -32,7 +32,7 @@ dependencies:
dev_dependencies: dev_dependencies:
archive: ">=1.0.0 <3.0.0" archive: ">=1.0.0 <3.0.0"
analyzer: ">=0.37.0 <0.40.0" analyzer: "^0.40.0"
cli_pkg: "^1.0.0-beta.10" cli_pkg: "^1.0.0-beta.10"
crypto: ">=0.9.2 <3.0.0" crypto: ">=0.9.2 <3.0.0"
dart_style: "^1.2.0" dart_style: "^1.2.0"

View File

@ -43,7 +43,8 @@ final _sharedClasses = const ['EvaluateResult', 'CompileResult'];
void synchronize() { void synchronize() {
sources.forEach((source, target) { sources.forEach((source, target) {
var visitor = _Visitor(File(source).readAsStringSync(), source); var visitor = _Visitor(File(source).readAsStringSync(), source);
parseFile(path: source, featureSet: FeatureSet.fromEnableFlags([]))
parseFile(path: source, featureSet: FeatureSet.latestLanguageVersion())
.unit .unit
.accept(visitor); .accept(visitor);
var formatted = DartFormatter().format(visitor.result); var formatted = DartFormatter().format(visitor.result);