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

Side by Side Diff: dart/sdk/lib/_internal/compiler/implementation/util/util.dart

Issue 11416004: Reject deprecated language features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: abstract class in resolver test Created 8 years, 1 month 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 org_dartlang_compiler_util; 5 library org_dartlang_compiler_util;
6 6
7 import 'util_implementation.dart'; 7 import 'util_implementation.dart';
8 import 'characters.dart'; 8 import 'characters.dart';
9 9
10 part 'link.dart'; 10 part 'link.dart';
11 11
12 /** 12 /**
13 * Tagging interface for classes from which source spans can be generated. 13 * Tagging interface for classes from which source spans can be generated.
14 */ 14 */
15 // TODO(johnniwinther): Find a better name. 15 // TODO(johnniwinther): Find a better name.
16 // TODO(ahe): How about "Bolt"? 16 // TODO(ahe): How about "Bolt"?
17 abstract class Spannable {} 17 abstract class Spannable {}
18 18
19 class SpannableAssertionFailure { 19 class SpannableAssertionFailure {
20 final Spannable node; 20 final Spannable node;
21 final String message; 21 final String message;
22 SpannableAssertionFailure(this.node, this.message); 22 SpannableAssertionFailure(this.node, this.message);
23 23
24 String toString() => 'compiler crashed.'; 24 String toString() => 'Compiler crashed: $message.';
25 } 25 }
26 26
27 /// Writes the characters of [iterator] on [buffer]. The characters 27 /// Writes the characters of [iterator] on [buffer]. The characters
28 /// are escaped as suitable for JavaScript and JSON. [buffer] is 28 /// are escaped as suitable for JavaScript and JSON. [buffer] is
29 /// anything which supports [:add:] and [:addCharCode:], for example, 29 /// anything which supports [:add:] and [:addCharCode:], for example,
30 /// [StringBuffer]. 30 /// [StringBuffer].
31 void writeJsonEscapedCharsOn(Iterator<int> iterator, buffer, onError(code)) { 31 void writeJsonEscapedCharsOn(Iterator<int> iterator, buffer, onError(code)) {
32 while (iterator.hasNext) { 32 while (iterator.hasNext) {
33 int code = iterator.next(); 33 int code = iterator.next();
34 if (identical(code, $SQ)) { 34 if (identical(code, $SQ)) {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 buffer.add('0'); 66 buffer.add('0');
67 } 67 }
68 } 68 }
69 buffer.add(code.toRadixString(16)); 69 buffer.add(code.toRadixString(16));
70 } else { 70 } else {
71 buffer.addCharCode(code); 71 buffer.addCharCode(code);
72 } 72 }
73 } 73 }
74 } 74 }
75 } 75 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698