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

Side by Side Diff: pkg/analysis_server/tool/spec/codegen_matchers.dart

Issue 469543002: Add a test to verify that analysis server code generation is up to date. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove unused imports Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 /** 5 /**
6 * Code generation for the file "matchers.dart". 6 * Code generation for the file "matchers.dart".
7 */ 7 */
8 library codegen.matchers; 8 library codegen.matchers;
9 9
10 import 'dart:convert'; 10 import 'dart:convert';
11 import 'dart:io';
12 11
13 import 'api.dart'; 12 import 'api.dart';
14 import 'codegen_tools.dart'; 13 import 'codegen_tools.dart';
15 import 'from_html.dart'; 14 import 'from_html.dart';
16 import 'to_html.dart'; 15 import 'to_html.dart';
17 16
18 class CodegenMatchersVisitor extends HierarchicalApiVisitor with CodeGenerator { 17 class CodegenMatchersVisitor extends HierarchicalApiVisitor with CodeGenerator {
19 /** 18 /**
20 * Visitor used to produce doc comments. 19 * Visitor used to produce doc comments.
21 */ 20 */
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 }); 181 });
183 write('}'); 182 write('}');
184 } 183 }
185 184
186 @override 185 @override
187 void visitTypeReference(TypeReference typeReference) { 186 void visitTypeReference(TypeReference typeReference) {
188 write(camelJoin(['is', typeReference.typeName])); 187 write(camelJoin(['is', typeReference.typeName]));
189 } 188 }
190 } 189 }
191 190
191 final GeneratedFile target = new GeneratedFile(
192 '../../test/integration/protocol_matchers.dart', () {
193 CodegenMatchersVisitor visitor = new CodegenMatchersVisitor(readApi());
194 return visitor.collectCode(visitor.visitApi);
195 });
196
192 /** 197 /**
193 * Translate spec_input.html into protocol_matchers.dart. 198 * Translate spec_input.html into protocol_matchers.dart.
194 */ 199 */
195 main() { 200 main() {
196 CodegenMatchersVisitor visitor = new CodegenMatchersVisitor(readApi()); 201 target.generate();
197 String code = visitor.collectCode(visitor.visitApi);
198 File outputFile = new File('../../test/integration/protocol_matchers.dart');
199 outputFile.writeAsStringSync(code);
200 } 202 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/tool/spec/codegen_java.dart ('k') | pkg/analysis_server/tool/spec/codegen_tools.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698