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

Unified Diff: pkg/analysis_server/tool/spec/codegen_matchers.dart

Issue 475143003: Fix code generated matchers to handle recursive objects. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/test/integration/protocol_matchers.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 74c76dbdd3880984cc41d8f385dde09dccd7e006..07a1b68961f2e2376fb4bba3acebdc5f5a3eede2 100644
--- a/pkg/analysis_server/tool/spec/codegen_matchers.dart
+++ b/pkg/analysis_server/tool/spec/codegen_matchers.dart
@@ -136,7 +136,7 @@ class CodegenMatchersVisitor extends HierarchicalApiVisitor with CodeGenerator {
@override
void visitTypeObject(TypeObject typeObject) {
- writeln('new MatchesJsonObject(');
+ writeln('new LazyMatcher(() => new MatchesJsonObject(');
indent(() {
write('${JSON.encode(context)}, ');
Iterable<TypeObjectField> requiredFields = typeObject.fields.where(
@@ -149,7 +149,7 @@ class CodegenMatchersVisitor extends HierarchicalApiVisitor with CodeGenerator {
outputObjectFields(optionalFields);
}
});
- write(')');
+ write('))');
}
/**
« no previous file with comments | « pkg/analysis_server/test/integration/protocol_matchers.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698