Chromium Code Reviews| 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 library analyzer.dart.element.element; | 5 library analyzer.dart.element.element; |
| 6 | 6 |
| 7 import 'package:analyzer/dart/ast/ast.dart'; | 7 import 'package:analyzer/dart/ast/ast.dart'; |
| 8 import 'package:analyzer/dart/element/type.dart'; | 8 import 'package:analyzer/dart/element/type.dart'; |
| 9 import 'package:analyzer/src/generated/constant.dart' show DartObject; | 9 import 'package:analyzer/src/generated/constant.dart' show DartObject; |
| 10 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; | 10 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; |
| (...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1541 static const Modifier HAS_EXT_URI = const Modifier('HAS_EXT_URI', 10); | 1541 static const Modifier HAS_EXT_URI = const Modifier('HAS_EXT_URI', 10); |
| 1542 | 1542 |
| 1543 /** | 1543 /** |
| 1544 * Indicates that the associated element did not have an explicit type | 1544 * Indicates that the associated element did not have an explicit type |
| 1545 * associated with it. If the element is an [ExecutableElement], then the | 1545 * associated with it. If the element is an [ExecutableElement], then the |
| 1546 * type being referred to is the return type. | 1546 * type being referred to is the return type. |
| 1547 */ | 1547 */ |
| 1548 static const Modifier IMPLICIT_TYPE = const Modifier('IMPLICIT_TYPE', 11); | 1548 static const Modifier IMPLICIT_TYPE = const Modifier('IMPLICIT_TYPE', 11); |
| 1549 | 1549 |
| 1550 /** | 1550 /** |
| 1551 * Indicates that a class can validly be used as a mixin. | |
| 1552 */ | |
| 1553 static const Modifier MIXIN = const Modifier('MIXIN', 12); | |
|
Brian Wilkerson
2016/01/26 15:03:21
Technically, this is a breaking change. I'm guessi
Paul Berry
2016/01/26 15:27:10
Agreed. How would you feel if I submitted a follo
Brian Wilkerson
2016/01/26 15:33:50
I wondered, when I reviewed this CL, why I had inc
Paul Berry
2016/01/26 16:35:09
Ok, thanks! I'll leave the ball in your court, th
| |
| 1554 | |
| 1555 /** | |
| 1556 * Indicates that a class is a mixin application. | 1551 * Indicates that a class is a mixin application. |
| 1557 */ | 1552 */ |
| 1558 static const Modifier MIXIN_APPLICATION = | 1553 static const Modifier MIXIN_APPLICATION = |
| 1559 const Modifier('MIXIN_APPLICATION', 13); | 1554 const Modifier('MIXIN_APPLICATION', 12); |
| 1560 | 1555 |
| 1561 /** | 1556 /** |
| 1562 * Indicates that the value of a parameter or local variable might be mutated | 1557 * Indicates that the value of a parameter or local variable might be mutated |
| 1563 * within the context. | 1558 * within the context. |
| 1564 */ | 1559 */ |
| 1565 static const Modifier POTENTIALLY_MUTATED_IN_CONTEXT = | 1560 static const Modifier POTENTIALLY_MUTATED_IN_CONTEXT = |
| 1566 const Modifier('POTENTIALLY_MUTATED_IN_CONTEXT', 14); | 1561 const Modifier('POTENTIALLY_MUTATED_IN_CONTEXT', 13); |
| 1567 | 1562 |
| 1568 /** | 1563 /** |
| 1569 * Indicates that the value of a parameter or local variable might be mutated | 1564 * Indicates that the value of a parameter or local variable might be mutated |
| 1570 * within the scope. | 1565 * within the scope. |
| 1571 */ | 1566 */ |
| 1572 static const Modifier POTENTIALLY_MUTATED_IN_SCOPE = | 1567 static const Modifier POTENTIALLY_MUTATED_IN_SCOPE = |
| 1573 const Modifier('POTENTIALLY_MUTATED_IN_SCOPE', 15); | 1568 const Modifier('POTENTIALLY_MUTATED_IN_SCOPE', 14); |
| 1574 | 1569 |
| 1575 /** | 1570 /** |
| 1576 * Indicates that a class contains an explicit reference to 'super'. | 1571 * Indicates that a class contains an explicit reference to 'super'. |
| 1577 */ | 1572 */ |
| 1578 static const Modifier REFERENCES_SUPER = | 1573 static const Modifier REFERENCES_SUPER = |
| 1579 const Modifier('REFERENCES_SUPER', 16); | 1574 const Modifier('REFERENCES_SUPER', 15); |
| 1580 | 1575 |
| 1581 /** | 1576 /** |
| 1582 * Indicates that the pseudo-modifier 'set' was applied to the element. | 1577 * Indicates that the pseudo-modifier 'set' was applied to the element. |
| 1583 */ | 1578 */ |
| 1584 static const Modifier SETTER = const Modifier('SETTER', 17); | 1579 static const Modifier SETTER = const Modifier('SETTER', 16); |
| 1585 | 1580 |
| 1586 /** | 1581 /** |
| 1587 * Indicates that the modifier 'static' was applied to the element. | 1582 * Indicates that the modifier 'static' was applied to the element. |
| 1588 */ | 1583 */ |
| 1589 static const Modifier STATIC = const Modifier('STATIC', 18); | 1584 static const Modifier STATIC = const Modifier('STATIC', 17); |
| 1590 | 1585 |
| 1591 /** | 1586 /** |
| 1592 * Indicates that the element does not appear in the source code but was | 1587 * Indicates that the element does not appear in the source code but was |
| 1593 * implicitly created. For example, if a class does not define any | 1588 * implicitly created. For example, if a class does not define any |
| 1594 * constructors, an implicit zero-argument constructor will be created and it | 1589 * constructors, an implicit zero-argument constructor will be created and it |
| 1595 * will be marked as being synthetic. | 1590 * will be marked as being synthetic. |
| 1596 */ | 1591 */ |
| 1597 static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 19); | 1592 static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 18); |
| 1598 | 1593 |
| 1599 static const List<Modifier> values = const [ | 1594 static const List<Modifier> values = const [ |
| 1600 ABSTRACT, | 1595 ABSTRACT, |
| 1601 ASYNCHRONOUS, | 1596 ASYNCHRONOUS, |
| 1602 CONST, | 1597 CONST, |
| 1603 DEFERRED, | 1598 DEFERRED, |
| 1604 ENUM, | 1599 ENUM, |
| 1605 EXTERNAL, | 1600 EXTERNAL, |
| 1606 FACTORY, | 1601 FACTORY, |
| 1607 FINAL, | 1602 FINAL, |
| 1608 GENERATOR, | 1603 GENERATOR, |
| 1609 GETTER, | 1604 GETTER, |
| 1610 HAS_EXT_URI, | 1605 HAS_EXT_URI, |
| 1611 IMPLICIT_TYPE, | 1606 IMPLICIT_TYPE, |
| 1612 MIXIN, | |
| 1613 MIXIN_APPLICATION, | 1607 MIXIN_APPLICATION, |
| 1614 POTENTIALLY_MUTATED_IN_CONTEXT, | 1608 POTENTIALLY_MUTATED_IN_CONTEXT, |
| 1615 POTENTIALLY_MUTATED_IN_SCOPE, | 1609 POTENTIALLY_MUTATED_IN_SCOPE, |
| 1616 REFERENCES_SUPER, | 1610 REFERENCES_SUPER, |
| 1617 SETTER, | 1611 SETTER, |
| 1618 STATIC, | 1612 STATIC, |
| 1619 SYNTHETIC | 1613 SYNTHETIC |
| 1620 ]; | 1614 ]; |
| 1621 | 1615 |
| 1622 const Modifier(String name, int ordinal) : super(name, ordinal); | 1616 const Modifier(String name, int ordinal) : super(name, ordinal); |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2049 */ | 2043 */ |
| 2050 bool get isStatic; | 2044 bool get isStatic; |
| 2051 | 2045 |
| 2052 /** | 2046 /** |
| 2053 * Return the declared type of this variable, or `null` if the variable did | 2047 * Return the declared type of this variable, or `null` if the variable did |
| 2054 * not have a declared type (such as if it was declared using the keyword | 2048 * not have a declared type (such as if it was declared using the keyword |
| 2055 * 'var'). | 2049 * 'var'). |
| 2056 */ | 2050 */ |
| 2057 DartType get type; | 2051 DartType get type; |
| 2058 } | 2052 } |
| OLD | NEW |