| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #library('mirrors'); | 5 #library('mirrors'); |
| 6 | 6 |
| 7 #import('dart:io'); | 7 #import('dart:io'); |
| 8 #import('dart:uri'); | 8 #import('dart:uri'); |
| 9 | 9 |
| 10 // TODO(rnystrom): Use "package:" URL (#4968). | 10 // TODO(rnystrom): Use "package:" URL (#4968). |
| (...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 474 */ | 474 */ |
| 475 int get start; | 475 int get start; |
| 476 | 476 |
| 477 /** | 477 /** |
| 478 * The character position where the location ends. | 478 * The character position where the location ends. |
| 479 */ | 479 */ |
| 480 int get end; | 480 int get end; |
| 481 | 481 |
| 482 /** | 482 /** |
| 483 * Returns the [Source] in which this [Location] indexes. | 483 * Returns the [Source] in which this [Location] indexes. |
| 484 * If [:loc:] is a location, [:loc.source().text()[loc.start()] is where it | 484 * If [:loc:] is a location, [:loc.source().text()[loc.start]:] is where it |
| 485 * starts, and [:loc.source().text()[loc.end()] is where it ends. | 485 * starts, and [:loc.source().text()[loc.end]:] is where it ends. |
| 486 */ | 486 */ |
| 487 Source get source; | 487 Source get source; |
| 488 | 488 |
| 489 /** | 489 /** |
| 490 * The text of the location span. | 490 * The text of the location span. |
| 491 */ | 491 */ |
| 492 String get text; | 492 String get text; |
| 493 } | 493 } |
| 494 | 494 |
| 495 /** | 495 /** |
| 496 * A [Source] describes the source code of a compilation unit in Dart source | 496 * A [Source] describes the source code of a compilation unit in Dart source |
| 497 * code. | 497 * code. |
| 498 */ | 498 */ |
| 499 abstract class Source { | 499 abstract class Source { |
| 500 /** | 500 /** |
| 501 * Returns the URI where the source originated. | 501 * Returns the URI where the source originated. |
| 502 */ | 502 */ |
| 503 Uri get uri; | 503 Uri get uri; |
| 504 | 504 |
| 505 /** | 505 /** |
| 506 * Returns the text of this source. | 506 * Returns the text of this source. |
| 507 */ | 507 */ |
| 508 String get text; | 508 String get text; |
| 509 } | 509 } |
| OLD | NEW |