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

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

Issue 1521883002: Fix lints: unnecessary_brace_in_string_interp (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « pkg/analysis_server/tool/spec/codegen_java_types.dart ('k') | pkg/analyzer/lib/task/model.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 5 /**
6 * Code for reading an HTML API description. 6 * Code for reading an HTML API description.
7 */ 7 */
8 library from.html; 8 library from.html;
9 9
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 if (!requiredAttributes.contains(name) && 100 if (!requiredAttributes.contains(name) &&
101 !optionalAttributes.contains(name)) { 101 !optionalAttributes.contains(name)) {
102 throw new Exception( 102 throw new Exception(
103 '$context: Unexpected attribute in ${element.localName}: $name'); 103 '$context: Unexpected attribute in ${element.localName}: $name');
104 } 104 }
105 attributesFound.add(name); 105 attributesFound.add(name);
106 }); 106 });
107 for (String expectedAttribute in requiredAttributes) { 107 for (String expectedAttribute in requiredAttributes) {
108 if (!attributesFound.contains(expectedAttribute)) { 108 if (!attributesFound.contains(expectedAttribute)) {
109 throw new Exception( 109 throw new Exception(
110 '$context: ${element.localName} must contain attribute ${expectedAttri bute}'); 110 '$context: ${element.localName} must contain attribute $expectedAttrib ute');
111 } 111 }
112 } 112 }
113 } 113 }
114 114
115 /** 115 /**
116 * Check that the given [element] has the given [expectedName]. 116 * Check that the given [element] has the given [expectedName].
117 */ 117 */
118 void checkName(dom.Element element, String expectedName, [String context]) { 118 void checkName(dom.Element element, String expectedName, [String context]) {
119 if (element.localName != expectedName) { 119 if (element.localName != expectedName) {
120 if (context == null) { 120 if (context == null) {
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 TypeDefinition typeDefinition = typeDefinitionFromHtml(child); 545 TypeDefinition typeDefinition = typeDefinitionFromHtml(child);
546 types[typeDefinition.name] = typeDefinition; 546 types[typeDefinition.name] = typeDefinition;
547 } 547 }
548 }); 548 });
549 return new Types(types, html); 549 return new Types(types, html);
550 } 550 }
551 551
552 typedef void ElementProcessor(dom.Element element); 552 typedef void ElementProcessor(dom.Element element);
553 553
554 typedef void TextProcessor(dom.Text text); 554 typedef void TextProcessor(dom.Text text);
OLDNEW
« no previous file with comments | « pkg/analysis_server/tool/spec/codegen_java_types.dart ('k') | pkg/analyzer/lib/task/model.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698