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

Unified Diff: compiler/java/com/google/dart/compiler/parser/DartParser.java

Issue 10575019: Gets rid of some warnings in the analyzer for unused code and unused imports (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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/parser/DartParser.java
diff --git a/compiler/java/com/google/dart/compiler/parser/DartParser.java b/compiler/java/com/google/dart/compiler/parser/DartParser.java
index df9abb86a43c63259573a0ff5bb51bf62ca7a66c..269ba9d7357e931ea72ba43db063408e67ce1044 100644
--- a/compiler/java/com/google/dart/compiler/parser/DartParser.java
+++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java
@@ -4079,39 +4079,7 @@ public class DartParser extends CompletionHooksParserBase {
return done(new DartSwitchStatement(expr, members));
}
- private void parseDeadSwitchCode() {
- boolean done = false;
- boolean warned = false;
- boolean oldInCaseStatement = inCaseStatement;
- inCaseStatement = true;
- try {
- while (!done) {
- if (peek(0) == Token.IDENTIFIER && peek(1) == Token.COLON) {
- beginLabel();
- DartIdentifier identifier = parseIdentifier();
- expect(Token.COLON);
- done(new DartLabel(identifier, null));
-
- }
-
- Token nextToken = peek(0);
- switch(nextToken) {
- case CASE:
- case DEFAULT:
- case EOS:
- case RBRACE:
- return;
- default:
- warned = true;
- parseStatement();
- }
- }
- } finally {
- inCaseStatement = oldInCaseStatement;
- }
- }
-
- /**
+ /**
* <pre>
* catchParameter
* : FINAL type? identifier

Powered by Google App Engine
This is Rietveld 408576698