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

Unified Diff: pkg/front_end/lib/src/fasta/source/source_loader.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/source/source_loader.dart
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index 7f430a77ca97f412582d05c13f66438de2a0192d..d95702b3df962e033b8b60b65e859e10c675de5b 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -75,6 +75,9 @@ class SourceLoader<L> extends Loader<L> {
/// The [FileSystem] which should be used to access files.
final FileSystem fileSystem;
+ /// Whether comments should be scanned and parsed.
+ final bool includeComments;
+
final Map<Uri, List<int>> sourceBytes = <Uri, List<int>>{};
final bool excludeSource = CompilerContext.current.options.excludeSource;
@@ -87,7 +90,8 @@ class SourceLoader<L> extends Loader<L> {
Instrumentation instrumentation;
- SourceLoader(this.fileSystem, KernelTarget target) : super(target);
+ SourceLoader(this.fileSystem, this.includeComments, KernelTarget target)
+ : super(target);
Future<Token> tokenize(SourceLibraryBuilder library,
{bool suppressLexicalErrors: false}) async {
@@ -114,7 +118,7 @@ class SourceLoader<L> extends Loader<L> {
}
byteCount += bytes.length - 1;
- ScannerResult result = scan(bytes);
+ ScannerResult result = scan(bytes, includeComments: includeComments);
Token token = result.tokens;
if (!suppressLexicalErrors) {
List<int> source = getSource(bytes);
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/source_library_builder.dart ('k') | pkg/front_end/lib/src/incremental/kernel_driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698