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

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

Issue 1674073002: Add UnlinkedConst.isValid and set it during summarizing. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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.summarize_ast; 5 library serialization.summarize_ast;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/visitor.dart'; 8 import 'package:analyzer/dart/ast/visitor.dart';
9 import 'package:analyzer/src/generated/scanner.dart'; 9 import 'package:analyzer/src/generated/scanner.dart';
10 import 'package:analyzer/src/generated/utilities_dart.dart'; 10 import 'package:analyzer/src/generated/utilities_dart.dart';
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 b.variables = variables; 385 b.variables = variables;
386 b.publicNamespace = computePublicNamespace(compilationUnit); 386 b.publicNamespace = computePublicNamespace(compilationUnit);
387 return b; 387 return b;
388 } 388 }
389 389
390 /** 390 /**
391 * Serialize the given [expression], creating an [UnlinkedConstBuilder]. 391 * Serialize the given [expression], creating an [UnlinkedConstBuilder].
392 */ 392 */
393 UnlinkedConstBuilder serializeConstExpr(Expression expression) { 393 UnlinkedConstBuilder serializeConstExpr(Expression expression) {
394 _ConstExprSerializer serializer = new _ConstExprSerializer(this); 394 _ConstExprSerializer serializer = new _ConstExprSerializer(this);
395 serializer.serialize(expression); 395 return serializer.serialize(expression);
396 return serializer.toBuilder();
397 } 396 }
398 397
399 /** 398 /**
400 * Serialize a [Comment] node into an [UnlinkedDocumentationComment] object. 399 * Serialize a [Comment] node into an [UnlinkedDocumentationComment] object.
401 */ 400 */
402 UnlinkedDocumentationCommentBuilder serializeDocumentation( 401 UnlinkedDocumentationCommentBuilder serializeDocumentation(
403 Comment documentationComment) { 402 Comment documentationComment) {
404 if (documentationComment == null) { 403 if (documentationComment == null) {
405 return null; 404 return null;
406 } 405 }
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 /** 890 /**
892 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s. 891 * A [_TypeParameterScope] is a [_Scope] which defines [_ScopedTypeParameter]s.
893 */ 892 */
894 class _TypeParameterScope extends _Scope { 893 class _TypeParameterScope extends _Scope {
895 /** 894 /**
896 * Get the number of [_ScopedTypeParameter]s defined in this 895 * Get the number of [_ScopedTypeParameter]s defined in this
897 * [_TypeParameterScope]. 896 * [_TypeParameterScope].
898 */ 897 */
899 int get length => _definedNames.length; 898 int get length => _definedNames.length;
900 } 899 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698