| 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 /** | 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'; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 @override | 99 @override |
| 100 visitApi() { | 100 visitApi() { |
| 101 outputHeader(); | 101 outputHeader(); |
| 102 writeln(); | 102 writeln(); |
| 103 writeln('/**'); | 103 writeln('/**'); |
| 104 writeln(' * Matchers for data types defined in the analysis server API'); | 104 writeln(' * Matchers for data types defined in the analysis server API'); |
| 105 writeln(' */'); | 105 writeln(' */'); |
| 106 writeln('library test.integration.protocol.matchers;'); | 106 writeln('library test.integration.protocol.matchers;'); |
| 107 writeln(); | 107 writeln(); |
| 108 writeln("import 'package:unittest/unittest.dart';"); | 108 writeln("import 'package:test/test.dart';"); |
| 109 writeln(); | 109 writeln(); |
| 110 writeln("import 'integration_tests.dart';"); | 110 writeln("import 'integration_tests.dart';"); |
| 111 writeln(); | 111 writeln(); |
| 112 writeln(); | 112 writeln(); |
| 113 for (ImpliedType impliedType in computeImpliedTypes(api).values) { | 113 for (ImpliedType impliedType in computeImpliedTypes(api).values) { |
| 114 makeMatcher(impliedType); | 114 makeMatcher(impliedType); |
| 115 } | 115 } |
| 116 } | 116 } |
| 117 | 117 |
| 118 @override | 118 @override |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 for (TypeDecl choice in typeUnion.choices) { | 183 for (TypeDecl choice in typeUnion.choices) { |
| 184 if (commaNeeded) { | 184 if (commaNeeded) { |
| 185 write(', '); | 185 write(', '); |
| 186 } | 186 } |
| 187 visitTypeDecl(choice); | 187 visitTypeDecl(choice); |
| 188 commaNeeded = true; | 188 commaNeeded = true; |
| 189 } | 189 } |
| 190 write('])'); | 190 write('])'); |
| 191 } | 191 } |
| 192 } | 192 } |
| OLD | NEW |