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

Unified Diff: pkg/analyzer/lib/src/summary/summarize_ast.dart

Issue 1833823002: Add tests for summarizing / resynthesizing using only AST. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/summary/prelink.dart ('k') | pkg/analyzer/lib/src/summary/summarize_elements.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/summary/summarize_ast.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index a527fba8bd9409198e9a06565c87692104173590..385c4c195195474d991161bab264850edf478968 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -521,7 +521,8 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
} else {
b.kind = UnlinkedExecutableKind.functionOrMethod;
}
- b.isAbstract = body is EmptyFunctionBody;
+ b.isExternal = isExternal;
+ b.isAbstract = !isExternal && body is EmptyFunctionBody;
b.name = nameString;
b.nameOffset = nameOffset;
b.typeParameters =
@@ -530,7 +531,6 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
b.isStatic = isDeclaredStatic;
}
b.returnType = serializeTypeName(returnType);
- b.isExternal = isExternal;
bool isSemanticallyStatic = isTopLevel || isDeclaredStatic;
if (formalParameters != null) {
b.parameters = formalParameters.parameters
@@ -890,6 +890,7 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
b.isExternal = node.externalKeyword != null;
b.documentationComment = serializeDocumentation(node.documentationComment);
b.annotations = serializeAnnotations(node.metadata);
+ b.codeRange = serializeCodeRange(node);
if (node.constKeyword != null) {
Set<String> constructorParameterNames =
node.parameters.parameters.map((p) => p.identifier.name).toSet();
@@ -913,6 +914,7 @@ class _SummarizeAstVisitor extends RecursiveAstVisitor {
b.defaultValueCode = node.defaultValue.toSource();
}
b.initializer = serializeInitializerFunction(node.defaultValue);
+ b.codeRange = serializeCodeRange(node);
return b;
}
« no previous file with comments | « pkg/analyzer/lib/src/summary/prelink.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