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

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

Issue 1528983004: Add support for the "external" keyword to summaries. (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
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 'package:analyzer/dart/element/element.dart'; 7 import 'package:analyzer/dart/element/element.dart';
8 import 'package:analyzer/dart/element/type.dart'; 8 import 'package:analyzer/dart/element/type.dart';
9 import 'package:analyzer/src/dart/element/type.dart'; 9 import 'package:analyzer/src/dart/element/type.dart';
10 import 'package:analyzer/src/generated/resolver.dart'; 10 import 'package:analyzer/src/generated/resolver.dart';
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 b.kind = UnlinkedExecutableKind.constructor; 339 b.kind = UnlinkedExecutableKind.constructor;
340 b.isConst = executableElement.isConst; 340 b.isConst = executableElement.isConst;
341 b.isFactory = executableElement.isFactory; 341 b.isFactory = executableElement.isFactory;
342 } else { 342 } else {
343 b.kind = UnlinkedExecutableKind.functionOrMethod; 343 b.kind = UnlinkedExecutableKind.functionOrMethod;
344 } 344 }
345 b.isAbstract = executableElement.isAbstract; 345 b.isAbstract = executableElement.isAbstract;
346 b.isStatic = executableElement.isStatic && 346 b.isStatic = executableElement.isStatic &&
347 executableElement.enclosingElement is ClassElement; 347 executableElement.enclosingElement is ClassElement;
348 b.hasImplicitReturnType = executableElement.hasImplicitReturnType; 348 b.hasImplicitReturnType = executableElement.hasImplicitReturnType;
349 b.isExternal = executableElement.isExternal;
349 return b; 350 return b;
350 } 351 }
351 352
352 /** 353 /**
353 * Serialize the given [exportElement] into an [UnlinkedExport]. 354 * Serialize the given [exportElement] into an [UnlinkedExport].
354 */ 355 */
355 UnlinkedExportBuilder serializeExport(ExportElement exportElement) { 356 UnlinkedExportBuilder serializeExport(ExportElement exportElement) {
356 UnlinkedExportBuilder b = new UnlinkedExportBuilder(ctx); 357 UnlinkedExportBuilder b = new UnlinkedExportBuilder(ctx);
357 b.uri = exportElement.uri; 358 b.uri = exportElement.uri;
358 b.combinators = exportElement.combinators.map(serializeCombinator).toList(); 359 b.combinators = exportElement.combinators.map(serializeCombinator).toList();
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 UnlinkedVariableBuilder b = new UnlinkedVariableBuilder(ctx); 554 UnlinkedVariableBuilder b = new UnlinkedVariableBuilder(ctx);
554 b.name = variable.name; 555 b.name = variable.name;
555 b.type = serializeTypeRef(variable.type, variable); 556 b.type = serializeTypeRef(variable.type, variable);
556 b.isStatic = variable.isStatic && variable.enclosingElement is ClassElement; 557 b.isStatic = variable.isStatic && variable.enclosingElement is ClassElement;
557 b.isFinal = variable.isFinal; 558 b.isFinal = variable.isFinal;
558 b.isConst = variable.isConst; 559 b.isConst = variable.isConst;
559 b.hasImplicitType = variable.hasImplicitType; 560 b.hasImplicitType = variable.hasImplicitType;
560 return b; 561 return b;
561 } 562 }
562 } 563 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698