| 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 22 matching lines...) Expand all Loading... |
| 33 * When an AST is resolved, the identifiers in the AST will be associated with | 33 * When an AST is resolved, the identifiers in the AST will be associated with |
| 34 * the elements that they refer to and every expression in the AST will have a | 34 * the elements that they refer to and every expression in the AST will have a |
| 35 * type associated with it. | 35 * type associated with it. |
| 36 */ | 36 */ |
| 37 library analyzer.dart.ast.ast; | 37 library analyzer.dart.ast.ast; |
| 38 | 38 |
| 39 import 'package:analyzer/dart/element/element.dart'; | 39 import 'package:analyzer/dart/element/element.dart'; |
| 40 import 'package:analyzer/dart/element/type.dart'; | 40 import 'package:analyzer/dart/element/type.dart'; |
| 41 import 'package:analyzer/src/dart/ast/ast.dart'; | 41 import 'package:analyzer/src/dart/ast/ast.dart'; |
| 42 import 'package:analyzer/src/dart/element/element.dart' show AuxiliaryElements; | 42 import 'package:analyzer/src/dart/element/element.dart' show AuxiliaryElements; |
| 43 import 'package:analyzer/src/generated/java_core.dart'; | |
| 44 import 'package:analyzer/src/generated/java_engine.dart'; | 43 import 'package:analyzer/src/generated/java_engine.dart'; |
| 45 import 'package:analyzer/src/generated/scanner.dart'; | 44 import 'package:analyzer/src/generated/scanner.dart'; |
| 46 import 'package:analyzer/src/generated/source.dart' show LineInfo, Source; | 45 import 'package:analyzer/src/generated/source.dart' show LineInfo, Source; |
| 47 import 'package:analyzer/src/generated/utilities_dart.dart'; | 46 import 'package:analyzer/src/generated/utilities_dart.dart'; |
| 48 | 47 |
| 49 /** | 48 /** |
| 50 * Two or more string literals that are implicitly concatenated because of being | 49 * Two or more string literals that are implicitly concatenated because of being |
| 51 * adjacent (separated only by whitespace). | 50 * adjacent (separated only by whitespace). |
| 52 * | 51 * |
| 53 * While the grammar only allows adjacent strings when all of the strings are of | 52 * While the grammar only allows adjacent strings when all of the strings are of |
| (...skipping 4439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4493 } | 4492 } |
| 4494 } | 4493 } |
| 4495 // test lengths of combinator lists first | 4494 // test lengths of combinator lists first |
| 4496 if (allHides1.length != allHides2.length) { | 4495 if (allHides1.length != allHides2.length) { |
| 4497 return allHides1.length - allHides2.length; | 4496 return allHides1.length - allHides2.length; |
| 4498 } | 4497 } |
| 4499 if (allShows1.length != allShows2.length) { | 4498 if (allShows1.length != allShows2.length) { |
| 4500 return allShows1.length - allShows2.length; | 4499 return allShows1.length - allShows2.length; |
| 4501 } | 4500 } |
| 4502 // next ensure that the lists are equivalent | 4501 // next ensure that the lists are equivalent |
| 4503 if (!javaCollectionContainsAll(allHides1, allHides2)) { | 4502 if (!allHides1.toSet().containsAll(allHides2)) { |
| 4504 return -1; | 4503 return -1; |
| 4505 } | 4504 } |
| 4506 if (!javaCollectionContainsAll(allShows1, allShows2)) { | 4505 if (!allShows1.toSet().containsAll(allShows2)) { |
| 4507 return -1; | 4506 return -1; |
| 4508 } | 4507 } |
| 4509 return 0; | 4508 return 0; |
| 4510 }; | 4509 }; |
| 4511 | 4510 |
| 4512 /** | 4511 /** |
| 4513 * Initialize a newly created import directive. Either or both of the | 4512 * Initialize a newly created import directive. Either or both of the |
| 4514 * [comment] and [metadata] can be `null` if the function does not have the | 4513 * [comment] and [metadata] can be `null` if the function does not have the |
| 4515 * corresponding attribute. The [deferredKeyword] can be `null` if the import | 4514 * corresponding attribute. The [deferredKeyword] can be `null` if the import |
| 4516 * is not deferred. The [asKeyword] and [prefix] can be `null` if the import | 4515 * is not deferred. The [asKeyword] and [prefix] can be `null` if the import |
| (...skipping 3494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8011 /** | 8010 /** |
| 8012 * Return the 'yield' keyword. | 8011 * Return the 'yield' keyword. |
| 8013 */ | 8012 */ |
| 8014 Token get yieldKeyword; | 8013 Token get yieldKeyword; |
| 8015 | 8014 |
| 8016 /** | 8015 /** |
| 8017 * Return the 'yield' keyword to the given [token]. | 8016 * Return the 'yield' keyword to the given [token]. |
| 8018 */ | 8017 */ |
| 8019 void set yieldKeyword(Token token); | 8018 void set yieldKeyword(Token token); |
| 8020 } | 8019 } |
| OLD | NEW |