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

Side by Side Diff: pkg/analysis_server/tool/spec/codegen_dart_protocol.dart

Issue 1842063003: Start making server strong mode clean (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Remove unintended change Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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 'package:analyzer/src/codegen/tools.dart'; 9 import 'package:analyzer/src/codegen/tools.dart';
10 import 'package:html/dom.dart' as dom; 10 import 'package:html/dom.dart' as dom;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 final ToHtmlVisitor toHtmlVisitor; 72 final ToHtmlVisitor toHtmlVisitor;
73 73
74 /** 74 /**
75 * Types implied by the API. This includes types explicitly named in the 75 * Types implied by the API. This includes types explicitly named in the
76 * API as well as those implied by the definitions of requests, responses, 76 * API as well as those implied by the definitions of requests, responses,
77 * notifications, etc. 77 * notifications, etc.
78 */ 78 */
79 final Map<String, ImpliedType> impliedTypes; 79 final Map<String, ImpliedType> impliedTypes;
80 80
81 CodegenProtocolVisitor(Api api) 81 CodegenProtocolVisitor(Api api)
82 : super(api), 82 : toHtmlVisitor = new ToHtmlVisitor(api),
83 toHtmlVisitor = new ToHtmlVisitor(api), 83 impliedTypes = computeImpliedTypes(api),
84 impliedTypes = computeImpliedTypes(api) { 84 super(api) {
85 codeGeneratorSettings.commentLineLength = 79; 85 codeGeneratorSettings.commentLineLength = 79;
86 codeGeneratorSettings.languageName = 'dart'; 86 codeGeneratorSettings.languageName = 'dart';
87 } 87 }
88 88
89 /** 89 /**
90 * Compute the code necessary to compare two objects for equality. 90 * Compute the code necessary to compare two objects for equality.
91 */ 91 */
92 String compareEqualsCode(TypeDecl type, String thisVar, String otherVar) { 92 String compareEqualsCode(TypeDecl type, String thisVar, String otherVar) {
93 TypeDecl resolvedType = resolveTypeReferenceChain(type); 93 TypeDecl resolvedType = resolveTypeReferenceChain(type);
94 if (resolvedType is TypeReference || 94 if (resolvedType is TypeReference ||
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 1233
1234 @override 1234 @override
1235 String get asClosure => '($type value) => ${callback('value')}'; 1235 String get asClosure => '($type value) => ${callback('value')}';
1236 1236
1237 @override 1237 @override
1238 bool get isIdentity => false; 1238 bool get isIdentity => false;
1239 1239
1240 @override 1240 @override
1241 String asSnippet(String value) => callback(value); 1241 String asSnippet(String value) => callback(value);
1242 } 1242 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698