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

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

Issue 1544213002: Introduce code to generate UnlinkedPublicNamespace directly from an AST. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 12 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 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';
11 import 'package:analyzer/src/generated/utilities_dart.dart'; 11 import 'package:analyzer/src/generated/utilities_dart.dart';
12 import 'package:analyzer/src/summary/builder.dart'; 12 import 'package:analyzer/src/summary/base.dart';
13 import 'package:analyzer/src/summary/format.dart'; 13 import 'package:analyzer/src/summary/format.dart';
14 14
15 /** 15 /**
16 * Serialize all the elements in [lib] to a summary using [ctx] as the context 16 * Serialize all the elements in [lib] to a summary using [ctx] as the context
17 * for building the summary, and using [typeProvider] to find built-in types. 17 * for building the summary, and using [typeProvider] to find built-in types.
18 */ 18 */
19 LibrarySerializationResult serializeLibrary( 19 LibrarySerializationResult serializeLibrary(
20 BuilderContext ctx, LibraryElement lib, TypeProvider typeProvider) { 20 BuilderContext ctx, LibraryElement lib, TypeProvider typeProvider) {
21 var serializer = new _LibrarySerializer(ctx, lib, typeProvider); 21 var serializer = new _LibrarySerializer(ctx, lib, typeProvider);
22 PrelinkedLibraryBuilder prelinked = serializer.serializeLibrary(); 22 PrelinkedLibraryBuilder prelinked = serializer.serializeLibrary();
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 UnlinkedVariableBuilder b = new UnlinkedVariableBuilder(ctx); 640 UnlinkedVariableBuilder b = new UnlinkedVariableBuilder(ctx);
641 b.name = variable.name; 641 b.name = variable.name;
642 b.type = serializeTypeRef(variable.type, variable); 642 b.type = serializeTypeRef(variable.type, variable);
643 b.isStatic = variable.isStatic && variable.enclosingElement is ClassElement; 643 b.isStatic = variable.isStatic && variable.enclosingElement is ClassElement;
644 b.isFinal = variable.isFinal; 644 b.isFinal = variable.isFinal;
645 b.isConst = variable.isConst; 645 b.isConst = variable.isConst;
646 b.hasImplicitType = variable.hasImplicitType; 646 b.hasImplicitType = variable.hasImplicitType;
647 return b; 647 return b;
648 } 648 }
649 } 649 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/summary/public_namespace_computer.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698