Skip to content

Commit

Permalink
remove Interface symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
fflaten committed Aug 13, 2022
1 parent 4c9c3f5 commit f9983b3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
5 changes: 0 additions & 5 deletions src/PowerShellEditorServices/Services/Symbols/SymbolType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ internal enum SymbolType
/// </summary>
Class,

/// <summary>
/// The symbol is a interface
/// </summary>
Interface,

/// <summary>
/// The symbol is a enum
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private static bool IsAssignedAtScriptScope(VariableExpressionAst variableExpres
}

/// <summary>
/// Adds class, enum and interface AST to symbol reference list
/// Adds class and AST to symbol reference list
/// </summary>
public override AstVisitAction VisitTypeDefinition(TypeDefinitionAst typeDefinitionAst)
{
Expand All @@ -99,12 +99,9 @@ public override AstVisitAction VisitTypeDefinition(TypeDefinitionAst typeDefinit
File = typeDefinitionAst.Extent.File
};

SymbolType symbolType = typeDefinitionAst switch
{
{ IsEnum: true } => SymbolType.Enum,
{ IsInterface: true } => SymbolType.Interface,
_ => SymbolType.Class,
};
SymbolType symbolType =
typeDefinitionAst.IsEnum ?
SymbolType.Enum : SymbolType.Class;

SymbolReferences.Add(
new SymbolReference(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ private static SymbolKind GetSymbolKind(SymbolType symbolType)
{
SymbolType.Configuration or SymbolType.Function or SymbolType.Workflow => SymbolKind.Function,
SymbolType.Enum => SymbolKind.Enum,
SymbolType.Interface => SymbolKind.Interface,
SymbolType.Class => SymbolKind.Class,
SymbolType.Constructor => SymbolKind.Constructor,
SymbolType.Method => SymbolKind.Method,
Expand All @@ -150,7 +149,6 @@ SymbolType.Configuration or
SymbolType.Function or
SymbolType.Workflow or
SymbolType.Enum or
SymbolType.Interface or
SymbolType.Class)
{
name += " { }";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ SymbolType.Configuration or
SymbolType.Function or
SymbolType.Workflow or
SymbolType.Enum or
SymbolType.Interface or
SymbolType.Class)
{
name += " { }";
Expand All @@ -122,7 +121,6 @@ private static SymbolKind GetSymbolKind(SymbolType symbolType)
{
SymbolType.Configuration or SymbolType.Function or SymbolType.Workflow => SymbolKind.Function,
SymbolType.Enum => SymbolKind.Enum,
SymbolType.Interface => SymbolKind.Interface,
SymbolType.Class => SymbolKind.Class,
SymbolType.Constructor => SymbolKind.Constructor,
SymbolType.Method => SymbolKind.Method,
Expand Down

0 comments on commit f9983b3

Please sign in to comment.