Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: lib/compiler/implementation/elements/elements.dart

Issue 10970038: Convert raw strings in compiler (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/dart_backend/renamer.dart ('k') | lib/compiler/implementation/js_backend/constant_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698