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

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

Issue 10027003: Fixes warnings and formatting issues in some dartc files (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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/AbstractParser.java
diff --git a/compiler/java/com/google/dart/compiler/parser/AbstractParser.java b/compiler/java/com/google/dart/compiler/parser/AbstractParser.java
index 231c5b399d714c92ce6b1fbe5f32d8779295745c..41f8f4a46cc58273d8d16842dcbbec4ae00ec382 100644
--- a/compiler/java/com/google/dart/compiler/parser/AbstractParser.java
+++ b/compiler/java/com/google/dart/compiler/parser/AbstractParser.java
@@ -11,7 +11,6 @@ import com.google.dart.compiler.DartCompilationError;
import com.google.dart.compiler.ErrorCode;
import com.google.dart.compiler.parser.DartScanner.Location;
-import java.lang.annotation.Annotation;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -39,10 +38,10 @@ abstract class AbstractParser {
private static void init(StackTraceElement[] stackTrace) {
if (classes == null) {
- classes = Maps.newHashMap();
+ classes = Maps.newHashMap();
methods = Maps.newHashMap();
}
-
+
for (StackTraceElement frame : stackTrace) {
Class<?> thisClass = classes.get(frame.getClassName());
if (thisClass == null) {
@@ -57,7 +56,7 @@ abstract class AbstractParser {
methods.put(thisClass.getName() + "." + method.getName(), tokens);
}
// look for annotations
- Terminals terminalsAnnotation = (Terminals) method
+ Terminals terminalsAnnotation = method
.getAnnotation(Terminals.class);
if (terminalsAnnotation != null) {
for (Token token : terminalsAnnotation.tokens()) {
@@ -84,8 +83,8 @@ abstract class AbstractParser {
return results;
}
}
-
-
+
+
/**
* Uses reflection to walk up the stack and look for @Terminals method
* annotations. It gathers up the tokens in these annotations and returns them

Powered by Google App Engine
This is Rietveld 408576698