| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 * Defines the AST model. The AST (Abstract Syntax Tree) model describes the | 6 * Defines the AST model. The AST (Abstract Syntax Tree) model describes the |
| 7 * syntactic (as opposed to semantic) structure of Dart code. The semantic | 7 * syntactic (as opposed to semantic) structure of Dart code. The semantic |
| 8 * structure of the code is modeled by the | 8 * structure of the code is modeled by the |
| 9 * [element model](../element/element.dart). | 9 * [element model](../element/element.dart). |
| 10 * | 10 * |
| (...skipping 4449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4460 if (compare != 0) { | 4460 if (compare != 0) { |
| 4461 return compare; | 4461 return compare; |
| 4462 } | 4462 } |
| 4463 } | 4463 } |
| 4464 } | 4464 } |
| 4465 // | 4465 // |
| 4466 // as | 4466 // as |
| 4467 // | 4467 // |
| 4468 SimpleIdentifier prefix1 = import1.prefix; | 4468 SimpleIdentifier prefix1 = import1.prefix; |
| 4469 SimpleIdentifier prefix2 = import2.prefix; | 4469 SimpleIdentifier prefix2 = import2.prefix; |
| 4470 String prefixStr1 = prefix1 != null ? prefix1.name : null; | 4470 String prefixStr1 = prefix1?.name; |
| 4471 String prefixStr2 = prefix2 != null ? prefix2.name : null; | 4471 String prefixStr2 = prefix2?.name; |
| 4472 if (prefixStr1 != null || prefixStr2 != null) { | 4472 if (prefixStr1 != null || prefixStr2 != null) { |
| 4473 if (prefixStr1 == null) { | 4473 if (prefixStr1 == null) { |
| 4474 return -1; | 4474 return -1; |
| 4475 } else if (prefixStr2 == null) { | 4475 } else if (prefixStr2 == null) { |
| 4476 return 1; | 4476 return 1; |
| 4477 } else { | 4477 } else { |
| 4478 int compare = prefixStr1.compareTo(prefixStr2); | 4478 int compare = prefixStr1.compareTo(prefixStr2); |
| 4479 if (compare != 0) { | 4479 if (compare != 0) { |
| 4480 return compare; | 4480 return compare; |
| 4481 } | 4481 } |
| (...skipping 3623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8105 /** | 8105 /** |
| 8106 * Return the 'yield' keyword. | 8106 * Return the 'yield' keyword. |
| 8107 */ | 8107 */ |
| 8108 Token get yieldKeyword; | 8108 Token get yieldKeyword; |
| 8109 | 8109 |
| 8110 /** | 8110 /** |
| 8111 * Return the 'yield' keyword to the given [token]. | 8111 * Return the 'yield' keyword to the given [token]. |
| 8112 */ | 8112 */ |
| 8113 void set yieldKeyword(Token token); | 8113 void set yieldKeyword(Token token); |
| 8114 } | 8114 } |
| OLD | NEW |