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

Side by Side Diff: runtime/observatory/lib/src/debugger/debugger_location.dart

Issue 2073893002: Removed all analyzer issues from tests (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated comments as full sentences Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of debugger; 5 part of debugger;
6 6
7 class DebuggerLocation { 7 class DebuggerLocation {
8 DebuggerLocation.file(this.script, this.line, this.col); 8 DebuggerLocation.file(this.script, this.line, this.col);
9 DebuggerLocation.func(this.function); 9 DebuggerLocation.func(this.function);
10 DebuggerLocation.error(this.errorMessage); 10 DebuggerLocation.error(this.errorMessage);
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 if (functions.length == 0) { 249 if (functions.length == 0) {
250 return new DebuggerLocation.error( 250 return new DebuggerLocation.error(
251 "Function '${match.group(0)}' not found"); 251 "Function '${match.group(0)}' not found");
252 } else if (functions.length == 1) { 252 } else if (functions.length == 1) {
253 return new DebuggerLocation.func(functions[0]); 253 return new DebuggerLocation.func(functions[0]);
254 } else { 254 } else {
255 // TODO(turnidge): Allow the user to disambiguate. 255 // TODO(turnidge): Allow the user to disambiguate.
256 return new DebuggerLocation.error( 256 return new DebuggerLocation.error(
257 "Function '${match.group(0)}' is ambiguous"); 257 "Function '${match.group(0)}' is ambiguous");
258 } 258 }
259 return new DebuggerLocation.error('foo');
260 }); 259 });
261 } 260 }
262 261
263 static RegExp partialSourceLocMatcher = 262 static RegExp partialSourceLocMatcher =
264 new RegExp(r'^([^\d:]?[^:]+[:]?)?(\d+)?([:]\d*)?'); 263 new RegExp(r'^([^\d:]?[^:]+[:]?)?(\d+)?([:]\d*)?');
265 static RegExp partialFunctionMatcher = new RegExp(r'^([^.]*)([.][^.]*)?'); 264 static RegExp partialFunctionMatcher = new RegExp(r'^([^.]*)([.][^.]*)?');
266 265
267 /// Completes a partial source location description. 266 /// Completes a partial source location description.
268 static Future<List<String>> complete(Debugger debugger, String locDesc) { 267 static Future<List<String>> complete(Debugger debugger, String locDesc) {
269 List<Future<List<String>>> pending = []; 268 List<Future<List<String>>> pending = [];
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 return 'invalid source location (${errorMessage})'; 443 return 'invalid source location (${errorMessage})';
445 } 444 }
446 445
447 Script script; 446 Script script;
448 int line; 447 int line;
449 int col; 448 int col;
450 ServiceFunction function; 449 ServiceFunction function;
451 String errorMessage; 450 String errorMessage;
452 bool get valid => (errorMessage == null); 451 bool get valid => (errorMessage == null);
453 } 452 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698