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

Side by Side Diff: lib/const_generator.dart

Issue 1829573002: Fix all strong mode warnings in protoc-plugin (Closed) Base URL: git@github.com:dart-lang/dart-protoc-plugin.git@master
Patch Set: regenerate pb.dart files Created 4 years, 8 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
« no previous file with comments | « bin/protoc_plugin_bazel.dart ('k') | lib/enum_generator.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 protoc.const_generator; 5 library protoc.const_generator;
6 6
7 import "indenting_writer.dart"; 7 import "indenting_writer.dart";
8 8
9 /// Writes JSON data as a Dart constant expression. 9 /// Writes JSON data as a Dart constant expression.
10 /// Accepts null, bool, num, String, and maps and lists. 10 /// Accepts null, bool, num, String, and maps and lists.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 out.print(", "); 85 out.print(", ");
86 } 86 }
87 writeJsonConst(out, item); 87 writeJsonConst(out, item);
88 if (vertical) { 88 if (vertical) {
89 out.println(","); 89 out.println(",");
90 } 90 }
91 first = false; 91 first = false;
92 } 92 }
93 } 93 }
94 94
95 void _writeMapItems(IndentingWriter out, Map<String, dynamic> val, 95 void _writeMapItems(IndentingWriter out, Map<dynamic, dynamic> val,
96 {bool vertical: false}) { 96 {bool vertical: false}) {
97 bool first = true; 97 bool first = true;
98 for (String key in val.keys) { 98 for (var key in val.keys) {
99 if (!first && !vertical) out.print(", "); 99 if (!first && !vertical) out.print(", ");
100 _writeString(out, key); 100 _writeString(out, key);
101 out.print(": "); 101 out.print(": ");
102 writeJsonConst(out, val[key]); 102 writeJsonConst(out, val[key]);
103 if (vertical) { 103 if (vertical) {
104 out.println(","); 104 out.println(",");
105 } 105 }
106 first = false; 106 first = false;
107 } 107 }
108 } 108 }
OLDNEW
« no previous file with comments | « bin/protoc_plugin_bazel.dart ('k') | lib/enum_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698