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

Side by Side Diff: pkg/analyzer/tool/summary/generate.dart

Issue 2270903002: Remove 'Element.docRange'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/test/src/summary/summary_common.dart ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 * This file contains code to generate serialization/deserialization logic for 6 * This file contains code to generate serialization/deserialization logic for
7 * summaries based on an "IDL" description of the summary format (written in 7 * summaries based on an "IDL" description of the summary format (written in
8 * stylized Dart). 8 * stylized Dart).
9 * 9 *
10 * For each class in the "IDL" input, two corresponding classes are generated: 10 * For each class in the "IDL" input, two corresponding classes are generated:
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 throw new Exception('$name: file identifier must be 4 characters'); 112 throw new Exception('$name: file identifier must be 4 characters');
113 } 113 }
114 for (int i = 0; i < cls.fileIdentifier.length; i++) { 114 for (int i = 0; i < cls.fileIdentifier.length; i++) {
115 if (cls.fileIdentifier.codeUnitAt(i) >= 256) { 115 if (cls.fileIdentifier.codeUnitAt(i) >= 256) {
116 throw new Exception( 116 throw new Exception(
117 '$name: file identifier must be encodable as Latin-1'); 117 '$name: file identifier must be encodable as Latin-1');
118 } 118 }
119 } 119 }
120 } 120 }
121 Map<int, String> idsUsed = <int, String>{}; 121 Map<int, String> idsUsed = <int, String>{};
122 for (idlModel.FieldDeclaration field in cls.fields) { 122 for (idlModel.FieldDeclaration field in cls.allFields) {
123 String fieldName = field.name; 123 String fieldName = field.name;
124 idlModel.FieldType type = field.type; 124 idlModel.FieldType type = field.type;
125 if (type.isList) { 125 if (type.isList) {
126 if (_idl.classes.containsKey(type.typeName)) { 126 if (_idl.classes.containsKey(type.typeName)) {
127 // List of classes is ok 127 // List of classes is ok
128 } else if (_idl.enums.containsKey(type.typeName)) { 128 } else if (_idl.enums.containsKey(type.typeName)) {
129 // List of enums is ok 129 // List of enums is ok
130 } else if (type.typeName == 'bool') { 130 } else if (type.typeName == 'bool') {
131 // List of booleans is ok 131 // List of booleans is ok
132 } else if (type.typeName == 'int') { 132 } else if (type.typeName == 'int') {
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 return token.lexeme.split('\n').map((String line) { 1023 return token.lexeme.split('\n').map((String line) {
1024 if (line.startsWith(indent)) { 1024 if (line.startsWith(indent)) {
1025 line = line.substring(indent.length); 1025 line = line.substring(indent.length);
1026 } 1026 }
1027 return line; 1027 return line;
1028 }).join('\n'); 1028 }).join('\n');
1029 } 1029 }
1030 return null; 1030 return null;
1031 } 1031 }
1032 } 1032 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/summary_common.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698