analysis 0.0.1-alpha.4 copy "analysis: ^0.0.1-alpha.4" to clipboard
analysis: ^0.0.1-alpha.4 copied to clipboard

outdatedDart 1 only

A set of utility classes to make common use cases of using the Dart analyzer.

analysis #

Build Status

A set of utility classes to make common use cases of using the Dart analyzer package simpler and without needing intimate knowledge of the internals.

SourceResolver #

Creating a resolver. #

// Create a default source resolver.
new SourceResolver();

// Create a source resolver with custom Dart package roots.
new SourceResolver(['/generated-files'])

Resolving a file to it's absolute location. #

// Example output: ~/git/analysis/packages/analysis/src/resolver.dart
sourceResolver.find(Uri.parse('package:analysis/src/resolver.dart'));

Finding the package location #

// Example output: package:analysis/src/resolver.dart
sourceResolver.resolve('~/git/analysis/packages/analysis/src/resolver.dart');

SourceVisitor #

Creating a visitor. #

// Create a default source crawler.
new SourceVisitor();

Crawl a file for libraries. #

// Example output: [
//   new Library(..., 'package:analysis/src/test_data/test_data.dart'),
//   new Library(..., 'dart:collection'),
//   new Library(..., 'package:analysis/src/test_data/test_import.dart')
// ]
var uri = Uri.parse('package:analysis/src/test_data/test_data.dart');
sourceVisitor.visit(uri: uri)

SourceCrawler #

Similar to SourceVisitor; recursively searches into imports of the visited file, and returns an iterable of every library parsed.

// Example output: [
//   Library(name: foo.bar),
//   Library(name: foo.baz)
// ]
sourceCrawler.crawl('package:foo/foo.dart')
0
likes
0
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

A set of utility classes to make common use cases of using the Dart analyzer.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer

More

Packages that depend on analysis