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

Unified Diff: pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart

Issue 3004763002: Add variable declaration support to the DeclaredIdentifier AST node in the Kythe Dart indexer. (Closed)
Patch Set: Created 3 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
diff --git a/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart b/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
index db0215908fd02da8c0e86e4a19221713b4bb8917..c1ddcdb98230141b3be418bbd396e87181e9ff09 100644
--- a/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
+++ b/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
@@ -429,6 +429,33 @@ class KytheDartVisitor extends GeneralizingAstVisitor with OutputUtils {
});
}
+ @override
+ visitDeclaredIdentifier(DeclaredIdentifier node) {
+ // variable
+ var variableVName = addNodeAndFacts(schema.VARIABLE_KIND,
+ element: node.element,
+ subKind: schema.LOCAL_SUBKIND,
+ completeFact: schema.DEFINITION);
+
+ // anchor
+ addAnchorEdgesContainingEdge(
+ syntacticEntity: node.identifier,
+ edges: [
+ schema.DEFINES_BINDING_EDGE,
+ ],
+ target: variableVName,
+ enclosingTarget: _enclosingVName);
+
+ // type
+ addEdge(
+ variableVName,
+ schema.TYPED_EDGE,
+ _vNameFromType(
+ resolutionMap.elementDeclaredByDeclaredIdentifier(node).type));
+
+ // no children
+ }
+
@override
visitEnumConstantDeclaration(EnumConstantDeclaration node) {
// constant node
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698