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

Unified Diff: compiler/java/com/google/dart/compiler/DartCompiler.java

Issue 9317093: Remove DartDocumentationGenerator and related flags. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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: compiler/java/com/google/dart/compiler/DartCompiler.java
diff --git a/compiler/java/com/google/dart/compiler/DartCompiler.java b/compiler/java/com/google/dart/compiler/DartCompiler.java
index 4976d2f93646b04758391369b5b362884c6bfef7..09dcbc592758934f69cc1e7929a62e33b92d0784 100644
--- a/compiler/java/com/google/dart/compiler/DartCompiler.java
+++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
@@ -29,7 +29,6 @@ import com.google.dart.compiler.metrics.DartEventType;
import com.google.dart.compiler.metrics.JvmMetrics;
import com.google.dart.compiler.metrics.Tracer;
import com.google.dart.compiler.metrics.Tracer.TraceEvent;
-import com.google.dart.compiler.parser.CommentPreservingParser;
import com.google.dart.compiler.parser.DartParser;
import com.google.dart.compiler.parser.DartScanner.Location;
import com.google.dart.compiler.parser.DartScannerParserContext;
@@ -128,7 +127,6 @@ public class DartCompiler {
private final Map<URI, LibraryUnit> libraries = new LinkedHashMap<URI, LibraryUnit>();
private boolean packageApp = false;
private final boolean checkOnly;
- private final boolean collectComments;
private CoreTypeProvider typeProvider;
private final boolean incremental;
private final boolean usePrecompiledDartLibs;
@@ -144,7 +142,6 @@ public class DartCompiler {
this.backends = config.getBackends();
this.context = context;
checkOnly = config.checkOnly();
- collectComments = config.collectComments();
for (LibrarySource library : embedded) {
if (SystemLibraryManager.isDartSpec(library.getName())) {
embeddedLibraries.add(context.getSystemLibraryFor(library.getName()));
@@ -819,9 +816,8 @@ public class DartCompiler {
if (packageApp) {
// When there's no entry-point in the application unit,
// don't attempt to package it. This can happen when
- // compileUnit() is called on a library. Always package app
- // when generating documentation.
- if (context.getApplicationUnit().getEntryNode() == null && !collectComments) {
+ // compileUnit() is called on a library.
+ if (context.getApplicationUnit().getEntryNode() == null) {
if (config.expectEntryPoint()) {
context.onError(new DartCompilationError(
context.getApplicationUnit().getSource(), Location.NONE,
@@ -865,17 +861,9 @@ public class DartCompiler {
Closeables.close(r, failed);
}
- DartParser parser;
- if (collectComments) {
- DartScannerParserContext parserContext =
- CommentPreservingParser.createContext(dartSrc, srcCode, context,
- context.getCompilerMetrics());
- parser = new CommentPreservingParser(parserContext, false);
- } else {
- DartScannerParserContext parserContext =
- new DartScannerParserContext(dartSrc, srcCode, context, context.getCompilerMetrics());
- parser = new DartParser(parserContext, libraryPrefixes, diet);
- }
+ DartScannerParserContext parserContext =
+ new DartScannerParserContext(dartSrc, srcCode, context, context.getCompilerMetrics());
+ DartParser parser = new DartParser(parserContext, libraryPrefixes, diet);
DartUnit unit = parser.parseUnit(dartSrc);
if (compilerMetrics != null) {
compilerMetrics.addParseTimeNano(CompilerMetrics.getThreadTime() - parseStart);

Powered by Google App Engine
This is Rietveld 408576698