Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(908)

Unified Diff: pkg/front_end/lib/src/fasta/kernel/kernel_target.dart

Issue 2977133002: Add documentationComment for Class to Kernel. Parse it. Resynthesize in Analyzer. (Closed)
Patch Set: Skip kDocumentationCommentIndex, don't store it. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
index 6a973d91860df9b45df7ef7792bc86e2724c7fd8..8dcdef41a5285817b78f62670ef1412379af48f9 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -94,6 +94,9 @@ class KernelTarget extends TargetImplementation {
/// The [FileSystem] which should be used to access files.
final FileSystem fileSystem;
+ /// Whether comments should be scanned and parsed.
+ final bool includeComments;
+
final DillTarget dillTarget;
/// Shared with [CompilerContext].
@@ -112,8 +115,8 @@ class KernelTarget extends TargetImplementation {
bool get disableTypeInference => backendTarget.disableTypeInference;
- KernelTarget(
- this.fileSystem, DillTarget dillTarget, UriTranslator uriTranslator,
+ KernelTarget(this.fileSystem, this.includeComments, DillTarget dillTarget,
+ UriTranslator uriTranslator,
[Map<String, Source> uriToSource])
: dillTarget = dillTarget,
uriToSource = uriToSource ?? CompilerContext.current.uriToSource,
@@ -123,7 +126,7 @@ class KernelTarget extends TargetImplementation {
}
SourceLoader<Library> createLoader() =>
- new SourceLoader<Library>(fileSystem, this);
+ new SourceLoader<Library>(fileSystem, includeComments, this);
void addSourceInformation(
Uri uri, List<int> lineStarts, List<int> sourceCode) {

Powered by Google App Engine
This is Rietveld 408576698