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

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

Issue 9651004: Make SourceInfo a class, rename its menthods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak for formatting, lazily create LainesInfo 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
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 0fc36b335e28c5e9b3d8859c1d8754043df374a2..ccd91a316966be5b6406f33429cd10052124e19a 100644
--- a/compiler/java/com/google/dart/compiler/parser/DartParser.java
+++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java
@@ -1245,10 +1245,10 @@ public class DartParser extends CompletionHooksParserBase {
if (method.getModifiers().isGetter() || method.getModifiers().isSetter()) {
DartField field = new DartField((DartIdentifier) method.getName(),
method.getModifiers().makeAbstractField(), method, null);
- field.setSourceInfo(method);
+ field.setSourceInfo(method.getSourceInfo());
DartFieldDefinition fieldDefinition =
new DartFieldDefinition(null, Lists.<DartField>create(field));
- fieldDefinition.setSourceInfo(field);
+ fieldDefinition.setSourceInfo(field.getSourceInfo());
return fieldDefinition;
}
// OK, use method as method.
@@ -3666,7 +3666,7 @@ public class DartParser extends CompletionHooksParserBase {
}
if ( catches.size() == 0 && finallyBlock == null) {
- reportError(new DartCompilationError(tryBlock.getSource(), new Location(position()),
+ reportError(new DartCompilationError(tryBlock.getSourceInfo().getSource(), new Location(position()),
ParserErrorCode.CATCH_OR_FINALLY_EXPECTED));
}

Powered by Google App Engine
This is Rietveld 408576698