| 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 import 'dart:convert'; |    8 import 'dart:convert'; | 
|    9  |    9  | 
|   10 import 'package:analyzer/src/codegen/tools.dart'; |   10 import 'package:analyzer/src/codegen/tools.dart'; | 
|   11 import 'package:front_end/src/codegen/tools.dart'; |   11 import 'package:front_end/src/codegen/tools.dart'; | 
|   12  |   12  | 
|   13 import 'api.dart'; |   13 import 'api.dart'; | 
|   14 import 'from_html.dart'; |   14 import 'from_html.dart'; | 
|   15 import 'implied_types.dart'; |   15 import 'implied_types.dart'; | 
|   16 import 'to_html.dart'; |   16 import 'to_html.dart'; | 
|   17  |   17  | 
|   18 final GeneratedFile target = new GeneratedFile( |   18 final GeneratedFile target = new GeneratedFile( | 
|   19     'test/integration/support/protocol_matchers.dart', (String pkgPath) { |   19     'test/integration/support/protocol_matchers.dart', (String pkgPath) async { | 
|   20   CodegenMatchersVisitor visitor = new CodegenMatchersVisitor(readApi(pkgPath)); |   20   CodegenMatchersVisitor visitor = new CodegenMatchersVisitor(readApi(pkgPath)); | 
|   21   return visitor.collectCode(visitor.visitApi); |   21   return visitor.collectCode(visitor.visitApi); | 
|   22 }); |   22 }); | 
|   23  |   23  | 
|   24 class CodegenMatchersVisitor extends HierarchicalApiVisitor with CodeGenerator { |   24 class CodegenMatchersVisitor extends HierarchicalApiVisitor with CodeGenerator { | 
|   25   /** |   25   /** | 
|   26    * Visitor used to produce doc comments. |   26    * Visitor used to produce doc comments. | 
|   27    */ |   27    */ | 
|   28   final ToHtmlVisitor toHtmlVisitor; |   28   final ToHtmlVisitor toHtmlVisitor; | 
|   29  |   29  | 
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  182     for (TypeDecl choice in typeUnion.choices) { |  182     for (TypeDecl choice in typeUnion.choices) { | 
|  183       if (commaNeeded) { |  183       if (commaNeeded) { | 
|  184         write(', '); |  184         write(', '); | 
|  185       } |  185       } | 
|  186       visitTypeDecl(choice); |  186       visitTypeDecl(choice); | 
|  187       commaNeeded = true; |  187       commaNeeded = true; | 
|  188     } |  188     } | 
|  189     write('])'); |  189     write('])'); | 
|  190   } |  190   } | 
|  191 } |  191 } | 
| OLD | NEW |