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

Side by Side Diff: runtime/lib/print_patch.dart

Issue 2220883004: Use metadata annotation @patch for patch classes (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: wip Created 4 years, 4 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
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 // A print-closure gets a String that should be printed. In general the 5 // A print-closure gets a String that should be printed. In general the
6 // string is a line, but it may contain "\n" characters. 6 // string is a line, but it may contain "\n" characters.
7 typedef void _PrintClosure(String line); 7 typedef void _PrintClosure(String line);
8 8
9 patch void printToConsole(String line) { 9 @patch void printToConsole(String line) {
10 _printClosure(line); 10 _printClosure(line);
11 } 11 }
12 12
13 void _unsupportedPrint(String line) { 13 void _unsupportedPrint(String line) {
14 throw new UnsupportedError("'print' is not supported"); 14 throw new UnsupportedError("'print' is not supported");
15 } 15 }
16 16
17 // _printClosure can be overwritten by the embedder to supply a different 17 // _printClosure can be overwritten by the embedder to supply a different
18 // print implementation. 18 // print implementation.
19 _PrintClosure _printClosure = _unsupportedPrint; 19 _PrintClosure _printClosure = _unsupportedPrint;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698