| OLD | NEW |
| 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 library codegen.protocol; | 5 library codegen.protocol; |
| 6 | 6 |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 | 8 |
| 9 import 'api.dart'; | 9 import 'api.dart'; |
| 10 import 'codegen_dart.dart'; | 10 import 'codegen_dart.dart'; |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 inputType = 'Request'; | 1223 inputType = 'Request'; |
| 1224 inputName = 'request'; | 1224 inputName = 'request'; |
| 1225 fieldName = '_params'; | 1225 fieldName = '_params'; |
| 1226 makeDecoder = 'new RequestDecoder(request)'; | 1226 makeDecoder = 'new RequestDecoder(request)'; |
| 1227 constructorName = 'fromRequest'; | 1227 constructorName = 'fromRequest'; |
| 1228 break; | 1228 break; |
| 1229 case 'requestResult': | 1229 case 'requestResult': |
| 1230 inputType = 'Response'; | 1230 inputType = 'Response'; |
| 1231 inputName = 'response'; | 1231 inputName = 'response'; |
| 1232 fieldName = '_result'; | 1232 fieldName = '_result'; |
| 1233 makeDecoder = 'new ResponseDecoder(response)'; | 1233 makeDecoder = |
| 1234 'new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id
))'; |
| 1234 constructorName = 'fromResponse'; | 1235 constructorName = 'fromResponse'; |
| 1235 break; | 1236 break; |
| 1236 case 'notificationParams': | 1237 case 'notificationParams': |
| 1237 inputType = 'Notification'; | 1238 inputType = 'Notification'; |
| 1238 inputName = 'notification'; | 1239 inputName = 'notification'; |
| 1239 fieldName = '_params'; | 1240 fieldName = '_params'; |
| 1240 makeDecoder = 'new ResponseDecoder(null)'; | 1241 makeDecoder = 'new ResponseDecoder(null)'; |
| 1241 constructorName = 'fromNotification'; | 1242 constructorName = 'fromNotification'; |
| 1242 break; | 1243 break; |
| 1243 case 'refactoringOptions': | 1244 case 'refactoringOptions': |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1284 CodegenProtocolVisitor visitor = new CodegenProtocolVisitor(readApi()); | 1285 CodegenProtocolVisitor visitor = new CodegenProtocolVisitor(readApi()); |
| 1285 return visitor.collectCode(visitor.visitApi); | 1286 return visitor.collectCode(visitor.visitApi); |
| 1286 }); | 1287 }); |
| 1287 | 1288 |
| 1288 /** | 1289 /** |
| 1289 * Translate spec_input.html into protocol_matchers.dart. | 1290 * Translate spec_input.html into protocol_matchers.dart. |
| 1290 */ | 1291 */ |
| 1291 main() { | 1292 main() { |
| 1292 target.generate(); | 1293 target.generate(); |
| 1293 } | 1294 } |
| OLD | NEW |