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

Side by Side Diff: pkg/analyzer_plugin/tool/spec/codegen_dart_protocol.dart

Issue 3002293003: Convert GeneratedContent to async and use AnalysisDriver for tasks graph. (Closed)
Patch Set: Created 3 years, 3 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) 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 import 'dart:convert'; 5 import 'dart:convert';
6 6
7 import 'package:analyzer/src/codegen/tools.dart'; 7 import 'package:analyzer/src/codegen/tools.dart';
8 import 'package:html/dom.dart' as dom; 8 import 'package:html/dom.dart' as dom;
9 import 'package:path/path.dart' as path; 9 import 'package:path/path.dart' as path;
10 10
(...skipping 11 matching lines...) Expand all
22 'abstract': '0x01', 22 'abstract': '0x01',
23 'const': '0x02', 23 'const': '0x02',
24 'final': '0x04', 24 'final': '0x04',
25 'static': '0x08', 25 'static': '0x08',
26 'private': '0x10', 26 'private': '0x10',
27 'deprecated': '0x20' 27 'deprecated': '0x20'
28 }; 28 };
29 29
30 GeneratedFile target(bool responseRequiresRequestTime) { 30 GeneratedFile target(bool responseRequiresRequestTime) {
31 return new GeneratedFile('lib/protocol/protocol_generated.dart', 31 return new GeneratedFile('lib/protocol/protocol_generated.dart',
32 (String pkgPath) { 32 (String pkgPath) async {
33 CodegenProtocolVisitor visitor = new CodegenProtocolVisitor( 33 CodegenProtocolVisitor visitor = new CodegenProtocolVisitor(
34 path.basename(pkgPath), responseRequiresRequestTime, readApi(pkgPath)); 34 path.basename(pkgPath), responseRequiresRequestTime, readApi(pkgPath));
35 return visitor.collectCode(visitor.visitApi); 35 return visitor.collectCode(visitor.visitApi);
36 }); 36 });
37 } 37 }
38 38
39 /** 39 /**
40 * Callback type used to represent arbitrary code generation. 40 * Callback type used to represent arbitrary code generation.
41 */ 41 */
42 typedef void CodegenCallback(); 42 typedef void CodegenCallback();
(...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 1316
1317 @override 1317 @override
1318 String get asClosure => '($type value) => ${callback('value')}'; 1318 String get asClosure => '($type value) => ${callback('value')}';
1319 1319
1320 @override 1320 @override
1321 bool get isIdentity => false; 1321 bool get isIdentity => false;
1322 1322
1323 @override 1323 @override
1324 String asSnippet(String value) => callback(value); 1324 String asSnippet(String value) => callback(value);
1325 } 1325 }
OLDNEW
« no previous file with comments | « pkg/analyzer_plugin/tool/spec/check_all_test.dart ('k') | pkg/analyzer_plugin/tool/spec/codegen_inttest_methods.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698