| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 /** | 5 /** |
| 6 * Interface representing a syntactic entity (either a token or an AST node) | 6 * Interface representing a syntactic entity (either a token or an AST node) |
| 7 * which has a location and extent in the source file. | 7 * which has a location and extent in the source file. |
| 8 */ | 8 */ |
| 9 abstract class SyntacticEntity { | 9 abstract class SyntacticEntity { |
| 10 /** | 10 /** |
| 11 * Return the offset from the beginning of the file to the character after the | 11 * Return the offset from the beginning of the file to the character after the |
| 12 * last character of the syntactic entity. | 12 * last character of the syntactic entity. |
| 13 */ | 13 */ |
| 14 int get end; | 14 int get end; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * Return the number of characters in the syntactic entity's source range. | 17 * Return the number of characters in the syntactic entity's source range. |
| 18 */ | 18 */ |
| 19 int get length; | 19 int get length; |
| 20 | 20 |
| 21 /** | 21 /** |
| 22 * Return the offset from the beginning of the file to the first character in | 22 * Return the offset from the beginning of the file to the first character in |
| 23 * the syntactic entity. | 23 * the syntactic entity. |
| 24 */ | 24 */ |
| 25 int get offset; | 25 int get offset; |
| 26 } | 26 } |
| OLD | NEW |