libraryFor abstract method

LibraryElementImpl libraryFor(
  1. Asset src, {
  2. bool allowSyntaxErrors = false,
})

Gets the library element for the given asset.

This creates or returns a cached library element for the asset, which represents the top-level structure of a Dart file.

@param src The asset to get the library for @param allowSyntaxErrors Whether to continue if syntax errors are encountered @return The library element for the asset

Implementation

LibraryElementImpl libraryFor(Asset src, {bool allowSyntaxErrors = false});