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

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

Issue 2293143003: Revert "Remove 'Element.docRange'." (Closed)
Patch Set: Created 4 years, 3 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/lib/src/summary/summarize_ast.dart ('k') | pkg/analyzer/pubspec.yaml » ('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) 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 serialization.elements; 5 library serialization.elements;
6 6
7 import 'dart:convert'; 7 import 'dart:convert';
8 8
9 import 'package:analyzer/dart/ast/ast.dart'; 9 import 'package:analyzer/dart/ast/ast.dart';
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 * Serialize documentation from the given [element], creating an 714 * Serialize documentation from the given [element], creating an
715 * [UnlinkedDocumentationComment]. 715 * [UnlinkedDocumentationComment].
716 * 716 *
717 * If [element] has no documentation, `null` is returned. 717 * If [element] has no documentation, `null` is returned.
718 */ 718 */
719 UnlinkedDocumentationCommentBuilder serializeDocumentation(Element element) { 719 UnlinkedDocumentationCommentBuilder serializeDocumentation(Element element) {
720 if (element.documentationComment == null) { 720 if (element.documentationComment == null) {
721 return null; 721 return null;
722 } 722 }
723 return new UnlinkedDocumentationCommentBuilder( 723 return new UnlinkedDocumentationCommentBuilder(
724 text: element.documentationComment); 724 text: element.documentationComment,
725 offset: element.docRange.offset,
726 length: element.docRange.length);
725 } 727 }
726 728
727 /** 729 /**
728 * Serialize the given [enumElement], creating an [UnlinkedEnum]. 730 * Serialize the given [enumElement], creating an [UnlinkedEnum].
729 */ 731 */
730 UnlinkedEnumBuilder serializeEnum(ClassElement enumElement) { 732 UnlinkedEnumBuilder serializeEnum(ClassElement enumElement) {
731 UnlinkedEnumBuilder b = new UnlinkedEnumBuilder(); 733 UnlinkedEnumBuilder b = new UnlinkedEnumBuilder();
732 b.name = enumElement.name; 734 b.name = enumElement.name;
733 b.nameOffset = enumElement.nameOffset; 735 b.nameOffset = enumElement.nameOffset;
734 List<UnlinkedEnumValueBuilder> values = <UnlinkedEnumValueBuilder>[]; 736 List<UnlinkedEnumValueBuilder> values = <UnlinkedEnumValueBuilder>[];
(...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after
1710 exportNames.add(new LinkedExportNameBuilder( 1712 exportNames.add(new LinkedExportNameBuilder(
1711 name: name, 1713 name: name,
1712 dependency: serializeDependency(dependentLibrary), 1714 dependency: serializeDependency(dependentLibrary),
1713 unit: unit, 1715 unit: unit,
1714 kind: kind)); 1716 kind: kind));
1715 } 1717 }
1716 pb.exportNames = exportNames; 1718 pb.exportNames = exportNames;
1717 return pb; 1719 return pb;
1718 } 1720 }
1719 } 1721 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_ast.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698