Index: pkg/analysis_server/tool/spec/codegen_matchers.dart |
diff --git a/pkg/analysis_server/tool/spec/codegen_matchers.dart b/pkg/analysis_server/tool/spec/codegen_matchers.dart |
index 5786493a63f3fcc1c9e1f65699ed93f306f5b882..be2f847e398d60cf8799bab47f3047a16cdc2244 100644 |
--- a/pkg/analysis_server/tool/spec/codegen_matchers.dart |
+++ b/pkg/analysis_server/tool/spec/codegen_matchers.dart |
@@ -9,25 +9,19 @@ library codegen.matchers; |
import 'dart:convert'; |
+import 'package:analyzer/src/codegen/tools.dart'; |
+ |
import 'api.dart'; |
-import 'codegen_tools.dart'; |
import 'from_html.dart'; |
import 'implied_types.dart'; |
import 'to_html.dart'; |
-final GeneratedFile target = |
- new GeneratedFile('../../test/integration/protocol_matchers.dart', () { |
- CodegenMatchersVisitor visitor = new CodegenMatchersVisitor(readApi()); |
+final GeneratedFile target = new GeneratedFile( |
+ 'test/integration/protocol_matchers.dart', (String pkgPath) { |
+ CodegenMatchersVisitor visitor = new CodegenMatchersVisitor(readApi(pkgPath)); |
return visitor.collectCode(visitor.visitApi); |
}); |
-/** |
- * Translate spec_input.html into protocol_matchers.dart. |
- */ |
-main() { |
- target.generate(); |
-} |
- |
class CodegenMatchersVisitor extends HierarchicalApiVisitor with CodeGenerator { |
/** |
* Visitor used to produce doc comments. |