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

Unified Diff: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionParser.java

Issue 10704180: Use 'int' instead of Position. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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: editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionParser.java
diff --git a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionParser.java b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionParser.java
index 2dd15412404cd104e21f0af4a06ff61cedd43295..94a3aa931aac657a4cc35612d481b6a4b008b430 100644
--- a/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionParser.java
+++ b/editor/tools/plugins/com.google.dart.tools.core/src/com/google/dart/tools/core/internal/completion/CompletionParser.java
@@ -100,7 +100,6 @@ import com.google.dart.compiler.ast.DartTypeParameter;
import com.google.dart.compiler.ast.DartVariableStatement;
import com.google.dart.compiler.metrics.CompilerMetrics;
import com.google.dart.compiler.parser.DartParser;
-import com.google.dart.compiler.parser.DartScanner;
import com.google.dart.compiler.parser.DartScanner.Location;
import com.google.dart.compiler.parser.Token;
import com.google.dart.tools.core.internal.completion.ast.BlockCompleter;
@@ -560,8 +559,8 @@ public class CompletionParser extends DartParser {
protected Token next() {
Token next = super.next();
Location loc = ctx.getTokenLocation();
- int start = loc.getBegin().getPos();
- int end = loc.getEnd().getPos();
+ int start = loc.getBegin();
+ int end = loc.getEnd();
if (start <= completionPosition && completionPosition <= end) {
completionToken = next;
} else {
@@ -571,8 +570,7 @@ public class CompletionParser extends DartParser {
}
@Override
- protected void reportError(DartScanner.Position position, ErrorCode errorCode,
- Object... arguments) {
+ protected void reportError(int position, ErrorCode errorCode, Object... arguments) {
// TODO completion analysis
peekMark();
// if (completionToken != null) {
@@ -583,7 +581,7 @@ public class CompletionParser extends DartParser {
}
@Override
- protected void reportUnexpectedToken(DartScanner.Position position, Token expected, Token actual) {
+ protected void reportUnexpectedToken(int position, Token expected, Token actual) {
super.reportUnexpectedToken(position, expected, actual);
}

Powered by Google App Engine
This is Rietveld 408576698