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

Side by Side Diff: pkg/analyzer/lib/src/summary/resynthesize.dart

Issue 1564343004: Add support for Element.docRange to the summary. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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) 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 library summary_resynthesizer; 5 library summary_resynthesizer;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/src/generated/element.dart'; 8 import 'package:analyzer/src/generated/element.dart';
9 import 'package:analyzer/src/generated/element_handle.dart'; 9 import 'package:analyzer/src/generated/element_handle.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 } 332 }
333 333
334 /** 334 /**
335 * Build the documentation for the given [element]. Does nothing if 335 * Build the documentation for the given [element]. Does nothing if
336 * [serializedDocumentationComment] is `null`. 336 * [serializedDocumentationComment] is `null`.
337 */ 337 */
338 void buildDocumentation(ElementImpl element, 338 void buildDocumentation(ElementImpl element,
339 UnlinkedDocumentationComment serializedDocumentationComment) { 339 UnlinkedDocumentationComment serializedDocumentationComment) {
340 if (serializedDocumentationComment != null) { 340 if (serializedDocumentationComment != null) {
341 element.documentationComment = serializedDocumentationComment.text; 341 element.documentationComment = serializedDocumentationComment.text;
342 element.setDocRange(serializedDocumentationComment.offset,
343 serializedDocumentationComment.length);
342 } 344 }
343 } 345 }
344 346
345 /** 347 /**
346 * Resynthesize the [ClassElement] corresponding to an enum, along with the 348 * Resynthesize the [ClassElement] corresponding to an enum, along with the
347 * associated fields and implicit accessors. 349 * associated fields and implicit accessors.
348 */ 350 */
349 void buildEnum(UnlinkedEnum serializedEnum) { 351 void buildEnum(UnlinkedEnum serializedEnum) {
350 assert(!isCoreLibrary); 352 assert(!isCoreLibrary);
351 // TODO(paulberry): add offset support (for this element type and others) 353 // TODO(paulberry): add offset support (for this element type and others)
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 break; 999 break;
998 } 1000 }
999 } 1001 }
1000 resummarizedElements[absoluteUri] = elementMap; 1002 resummarizedElements[absoluteUri] = elementMap;
1001 unitHolder = null; 1003 unitHolder = null;
1002 prelinkedUnit = null; 1004 prelinkedUnit = null;
1003 unlinkedUnit = null; 1005 unlinkedUnit = null;
1004 return entryPoint; 1006 return entryPoint;
1005 } 1007 }
1006 } 1008 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/format.dart ('k') | pkg/analyzer/lib/src/summary/summarize_elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698