Files
sdk/pkg/analyzer/lib/dart/analysis/context_builder.dart
T
Konstantin Shcheglov 1f52372bfa Remove CFE integration from analyzer, analysis_server, and analyzer_cli.
AnalysisDriverResolutionTest is partially updated, about 30 failing
tests added. I will get back to it in a following CL, it is not
directly CFE integration, but updated understanding how we want to
resolve. For example we don't need types for non-expression identifiers.

Change-Id: I3daddbb6c66ffad7a726f3313a1199fd7387aa04
Reviewed-on: https://dart-review.googlesource.com/71883
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2018-08-29 13:46:45 +00:00

43 lines
1.7 KiB
Dart

// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:analyzer/dart/analysis/analysis_context.dart';
import 'package:analyzer/dart/analysis/context_root.dart';
import 'package:analyzer/dart/analysis/declared_variables.dart';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/src/dart/analysis/context_builder.dart';
import 'package:meta/meta.dart';
/**
* A utility class used to build an analysis context based on a context root.
*
* Clients may not extend, implement or mix-in this class.
*/
abstract class ContextBuilder {
/**
* Initialize a newly created context builder. If a [resourceProvider] is
* given, then it will be used to access the file system, otherwise the
* default resource provider will be used.
*/
factory ContextBuilder({ResourceProvider resourceProvider}) =
ContextBuilderImpl;
/**
* Return an analysis context corresponding to the given [contextRoot].
*
* If a set of [declaredVariables] is provided, the values will be used to map
* the the variable names found in `fromEnvironment` invocations to the
* constant value that will be returned. If none is given, then no variables
* will be defined.
*
* If an [sdkPath] is provided, and if it is a valid path to a directory
* containing a valid SDK, then the SDK in the referenced directory will be
* used when analyzing the code in the context.
*/
AnalysisContext createContext(
{@required ContextRoot contextRoot,
DeclaredVariables declaredVariables,
String sdkPath});
}