| 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('elements'); | 5 #library('elements'); |
| 6 | 6 |
| 7 #import('dart:uri'); | 7 #import('dart:uri'); |
| 8 | 8 |
| 9 #import('../tree/tree.dart'); | 9 #import('../tree/tree.dart'); |
| 10 #import('../scanner/scannerlib.dart'); | 10 #import('../scanner/scannerlib.dart'); |
| (...skipping 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1591 } | 1591 } |
| 1592 | 1592 |
| 1593 static SourceString constructConstructorName(SourceString receiver, | 1593 static SourceString constructConstructorName(SourceString receiver, |
| 1594 SourceString selector) { | 1594 SourceString selector) { |
| 1595 String r = receiver.slowToString(); | 1595 String r = receiver.slowToString(); |
| 1596 String s = selector.slowToString(); | 1596 String s = selector.slowToString(); |
| 1597 return new SourceString('$r\$$s'); | 1597 return new SourceString('$r\$$s'); |
| 1598 } | 1598 } |
| 1599 | 1599 |
| 1600 static const SourceString OPERATOR_EQUALS = | 1600 static const SourceString OPERATOR_EQUALS = |
| 1601 const SourceString(@'operator$eq'); | 1601 const SourceString(r'operator$eq'); |
| 1602 | 1602 |
| 1603 static SourceString constructOperatorName(SourceString selector, | 1603 static SourceString constructOperatorName(SourceString selector, |
| 1604 bool isUnary) { | 1604 bool isUnary) { |
| 1605 String str = selector.stringValue; | 1605 String str = selector.stringValue; |
| 1606 if (str === '==' || str === '!=') return OPERATOR_EQUALS; | 1606 if (str === '==' || str === '!=') return OPERATOR_EQUALS; |
| 1607 | 1607 |
| 1608 if (str === '~') { | 1608 if (str === '~') { |
| 1609 str = 'not'; | 1609 str = 'not'; |
| 1610 } else if (str === '-' && isUnary) { | 1610 } else if (str === '-' && isUnary) { |
| 1611 // TODO(ahe): Return something like 'unary -'. | 1611 // TODO(ahe): Return something like 'unary -'. |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1792 | 1792 |
| 1793 MetadataAnnotation ensureResolved(Compiler compiler) { | 1793 MetadataAnnotation ensureResolved(Compiler compiler) { |
| 1794 if (resolutionState == STATE_NOT_STARTED) { | 1794 if (resolutionState == STATE_NOT_STARTED) { |
| 1795 compiler.resolver.resolveMetadataAnnotation(this); | 1795 compiler.resolver.resolveMetadataAnnotation(this); |
| 1796 } | 1796 } |
| 1797 return this; | 1797 return this; |
| 1798 } | 1798 } |
| 1799 | 1799 |
| 1800 String toString() => 'MetadataAnnotation($value, $resolutionState)'; | 1800 String toString() => 'MetadataAnnotation($value, $resolutionState)'; |
| 1801 } | 1801 } |
| OLD | NEW |