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

Side by Side Diff: pkg/front_end/tool/_fasta/generate_messages.dart

Issue 2876813002: Implement generalized function types. (Closed)
Patch Set: Address comments. Created 3 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
« no previous file with comments | « pkg/front_end/messages.yaml ('k') | pkg/testing/lib/src/analyze.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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'dart:io'; 5 import 'dart:io';
6 6
7 import 'dart:isolate'; 7 import 'dart:isolate';
8 8
9 import 'package:yaml/yaml.dart' show loadYaml; 9 import 'package:yaml/yaml.dart' show loadYaml;
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 List<String> messageArguments = <String>[]; 115 List<String> messageArguments = <String>[];
116 messageArguments.add(interpolate("message", template)); 116 messageArguments.add(interpolate("message", template));
117 if (tip != null) { 117 if (tip != null) {
118 messageArguments.add(interpolate("tip", tip)); 118 messageArguments.add(interpolate("tip", tip));
119 } 119 }
120 messageArguments.add("arguments: { ${arguments.join(', ')} }"); 120 messageArguments.add("arguments: { ${arguments.join(', ')} }");
121 121
122 return """ 122 return """
123 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 123 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
124 const FastaCode<_$name> code$name = 124 const FastaCode<_$name> code$name =
125 const FastaCode<_$name>(${codeArguments.join(', ')}); 125 const FastaCode<_$name>(\"$name\", ${codeArguments.join(', ')});
126 126
127 typedef FastaMessage _$name(${parameters.join(', ')}); 127 typedef FastaMessage _$name(${parameters.join(', ')});
128 128
129 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. 129 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
130 FastaMessage _format$name(${parameters.join(', ')}) { 130 FastaMessage _format$name(${parameters.join(', ')}) {
131 ${conversions.join('\n ')} 131 ${conversions.join('\n ')}
132 return new FastaMessage( 132 return new FastaMessage(
133 uri, 133 uri,
134 charOffset, 134 charOffset,
135 code$name, 135 code$name,
136 ${messageArguments.join(', ')}); 136 ${messageArguments.join(', ')});
137 } 137 }
138 """; 138 """;
139 } 139 }
OLDNEW
« no previous file with comments | « pkg/front_end/messages.yaml ('k') | pkg/testing/lib/src/analyze.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698