Skip to content

Commit

Permalink
Merge pull request #48451 from Youssef1313/records-graph-query
Browse files Browse the repository at this point in the history
Fix graph query for records
  • Loading branch information
jasonmalinowski authored Oct 12, 2020
2 parents 63dbafb + ea13ee6 commit 04481d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public IEnumerable<SyntaxNode> GetTopLevelNodesFromDocument(SyntaxNode root, Can
if (!cancellationToken.IsCancellationRequested)
{
if (node.Kind() == SyntaxKind.ClassDeclaration ||
node.Kind() == SyntaxKind.RecordDeclaration ||
node.Kind() == SyntaxKind.DelegateDeclaration ||
node.Kind() == SyntaxKind.EnumDeclaration ||
node.Kind() == SyntaxKind.InterfaceDeclaration ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Progression
enum E { }
interface I { }
struct S { }
record R1 { }
record R2;
</Document>
</Project>
</Workspace>)
Expand All @@ -36,12 +38,16 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.Progression
<Node Id="(@3 Type=C)" Category="CodeSchema_Class" CodeSchemaProperty_IsInternal="True" CommonLabel="C" Icon="Microsoft.VisualStudio.Class.Internal" Label="C"/>
<Node Id="(@3 Type=E)" Category="CodeSchema_Enum" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsInternal="True" CommonLabel="E" Icon="Microsoft.VisualStudio.Enum.Internal" Label="E"/>
<Node Id="(@3 Type=I)" Category="CodeSchema_Interface" CodeSchemaProperty_IsAbstract="True" CodeSchemaProperty_IsInternal="True" CommonLabel="I" Icon="Microsoft.VisualStudio.Interface.Internal" Label="I"/>
<Node Id="(@3 Type=R1)" Category="CodeSchema_Class" CodeSchemaProperty_IsInternal="True" CommonLabel="R1" Icon="Microsoft.VisualStudio.Class.Internal" Label="R1"/>
<Node Id="(@3 Type=R2)" Category="CodeSchema_Class" CodeSchemaProperty_IsInternal="True" CommonLabel="R2" Icon="Microsoft.VisualStudio.Class.Internal" Label="R2"/>
<Node Id="(@3 Type=S)" Category="CodeSchema_Struct" CodeSchemaProperty_IsFinal="True" CodeSchemaProperty_IsInternal="True" CommonLabel="S" Icon="Microsoft.VisualStudio.Struct.Internal" Label="S"/>
</Nodes>
<Links>
<Link Source="(@1 @2)" Target="(@3 Type=C)" Category="Contains"/>
<Link Source="(@1 @2)" Target="(@3 Type=E)" Category="Contains"/>
<Link Source="(@1 @2)" Target="(@3 Type=I)" Category="Contains"/>
<Link Source="(@1 @2)" Target="(@3 Type=R1)" Category="Contains"/>
<Link Source="(@1 @2)" Target="(@3 Type=R2)" Category="Contains"/>
<Link Source="(@1 @2)" Target="(@3 Type=S)" Category="Contains"/>
</Links>
<IdentifierAliases>
Expand Down

0 comments on commit 04481d2

Please sign in to comment.