OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 dart2js.serialization.json; | 5 library dart2js.serialization.json; |
6 | 6 |
7 import 'dart:convert'; | 7 import 'dart:convert'; |
8 import 'keys.dart'; | 8 import 'keys.dart'; |
9 import 'serialization.dart'; | 9 import 'serialization.dart'; |
10 import 'values.dart'; | 10 import 'values.dart'; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 value.accept(this, indentation); | 106 value.accept(this, indentation); |
107 } | 107 } |
108 | 108 |
109 @override | 109 @override |
110 void visitBool(BoolValue value, String indentation) { | 110 void visitBool(BoolValue value, String indentation) { |
111 buffer.write(value.value); | 111 buffer.write(value.value); |
112 } | 112 } |
113 | 113 |
114 @override | 114 @override |
115 void visitConstant(ConstantValue value, String indentation) { | 115 void visitConstant(ConstantValue value, String indentation) { |
116 buffer.write('Constant(${value.id}):${value.constant.getText()}'); | 116 buffer.write('Constant(${value.id}):${value.constant.toDartText()}'); |
117 } | 117 } |
118 | 118 |
119 @override | 119 @override |
120 void visitDouble(DoubleValue value, String indentation) { | 120 void visitDouble(DoubleValue value, String indentation) { |
121 buffer.write(value.value); | 121 buffer.write(value.value); |
122 } | 122 } |
123 | 123 |
124 @override | 124 @override |
125 void visitElement(ElementValue value, String indentation) { | 125 void visitElement(ElementValue value, String indentation) { |
126 buffer.write('Element(${value.id}):${value.element}'); | 126 buffer.write('Element(${value.id}):${value.element}'); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 @override | 204 @override |
205 void visitType(TypeValue value, String indentation) { | 205 void visitType(TypeValue value, String indentation) { |
206 buffer.write('Type(${value.id}):${value.type}'); | 206 buffer.write('Type(${value.id}):${value.type}'); |
207 } | 207 } |
208 | 208 |
209 @override | 209 @override |
210 void visitUri(UriValue value, String indentation) { | 210 void visitUri(UriValue value, String indentation) { |
211 buffer.write('Uri(${value.value})'); | 211 buffer.write('Uri(${value.value})'); |
212 } | 212 } |
213 } | 213 } |
OLD | NEW |