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

Side by Side Diff: pkg/compiler/lib/src/serialization/json_serializer.dart

Issue 1916053003: Add toStructuredText to ConstantExpression and align method names with ConstantValue (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: dartfmt Created 4 years, 7 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) 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
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/serialization/constant_serialization.dart ('k') | pkg/compiler/lib/src/serialization/values.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698