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

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

Issue 9958049: Add some command line options to debug AST parsing of illegal dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed 'highlight unresolved', it didn't do much good Created 8 years, 9 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
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/DartCompiler.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiler/java/com/google/dart/compiler/CommandLineOptions.java
diff --git a/compiler/java/com/google/dart/compiler/CommandLineOptions.java b/compiler/java/com/google/dart/compiler/CommandLineOptions.java
index 5ebd4d509e2abf28f83f396fd9e911fb70d6a95d..af389905cef8f82494aeda1868633cc090470071 100644
--- a/compiler/java/com/google/dart/compiler/CommandLineOptions.java
+++ b/compiler/java/com/google/dart/compiler/CommandLineOptions.java
@@ -109,6 +109,14 @@ public class CommandLineOptions {
@Option(name = "--show-sdk-warnings", usage = "show warnings from SDK source")
private boolean showSdkWarnings = false;
+
+ @Option(name = "--source-from-ast",
+ usage = "For debugging, reconstitute source code from the parsed AST.")
+ private boolean showSourceFromAst = false;
+
+ @Option(name = "--resolve-on-parse-error",
+ usage = "For debugging, continue on with resolution even if there are parse errors.")
+ private boolean resolveDespiteParseErrors;
@Argument
private final List<String> sourceFiles = new ArrayList<String>();
@@ -175,6 +183,10 @@ public class CommandLineOptions {
return disableTypeOptimizations;
}
+ public boolean resolveDespiteParseErrors() {
+ return resolveDespiteParseErrors;
+ }
+
/**
* Returns <code>true</code> if the compiler should print it's help message.
*/
@@ -191,6 +203,14 @@ public class CommandLineOptions {
}
/**
+ * if <code>true</code>, run the AST back through the DartSourceVisitor to create source
+ * from the parsed AST and print to stdout.
+ */
+ public boolean showSourceFromAst() {
+ return showSourceFromAst;
+ }
+
+ /**
* Returns whether type errors are fatal.
*/
public boolean typeErrorsAreFatal() {
« no previous file with comments | « no previous file | compiler/java/com/google/dart/compiler/DartCompiler.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698