Clean
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
using Common;
|
||||
using Syntax.Node;
|
||||
using Syntax.Parsing;
|
||||
using Syntax.Parsing.Node;
|
||||
using Syntax.Typing;
|
||||
using Syntax.Typing.BoundNode;
|
||||
|
||||
namespace Syntax;
|
||||
|
||||
@@ -73,48 +72,6 @@ public class DefinitionTable
|
||||
|
||||
return Optional<TraitFunc>.Empty();
|
||||
}
|
||||
|
||||
public IEnumerable<StructDefinitionNode> GetStructs()
|
||||
{
|
||||
return _syntaxTrees
|
||||
.SelectMany(c => c.Definitions)
|
||||
.OfType<StructDefinitionNode>();
|
||||
}
|
||||
|
||||
public IEnumerable<FuncDefinition> GetFunctions()
|
||||
{
|
||||
return _syntaxTrees
|
||||
.SelectMany(c => c.Definitions)
|
||||
.OfType<FuncDefinition>();
|
||||
}
|
||||
|
||||
public IEnumerable<LocalFuncDefinitionNode> GetLocalFunctions()
|
||||
{
|
||||
return _syntaxTrees
|
||||
.SelectMany(c => c.Definitions)
|
||||
.OfType<LocalFuncDefinitionNode>();
|
||||
}
|
||||
|
||||
public IEnumerable<ExternFuncDefinitionNode> GetExternFunctions()
|
||||
{
|
||||
return _syntaxTrees
|
||||
.SelectMany(c => c.Definitions)
|
||||
.OfType<ExternFuncDefinitionNode>();
|
||||
}
|
||||
|
||||
public IEnumerable<TraitDefinitionNode> GetTraits()
|
||||
{
|
||||
return _syntaxTrees
|
||||
.SelectMany(c => c.Definitions)
|
||||
.OfType<TraitDefinitionNode>();
|
||||
}
|
||||
|
||||
public IEnumerable<TraitImplementationDefinitionNode> GetTraitImplementations()
|
||||
{
|
||||
return _syntaxTrees
|
||||
.SelectMany(c => c.Definitions)
|
||||
.OfType<TraitImplementationDefinitionNode>();
|
||||
}
|
||||
}
|
||||
|
||||
public class BoundDefinitionTable
|
||||
@@ -192,38 +149,10 @@ public class BoundDefinitionTable
|
||||
.OfType<BoundStructDefinitionNode>();
|
||||
}
|
||||
|
||||
public IEnumerable<BoundFuncDefinition> GetFunctions()
|
||||
{
|
||||
return _syntaxTrees
|
||||
.SelectMany(c => c.Definitions)
|
||||
.OfType<BoundFuncDefinition>();
|
||||
}
|
||||
|
||||
public IEnumerable<BoundLocalFuncDefinitionNode> GetLocalFunctions()
|
||||
{
|
||||
return _syntaxTrees
|
||||
.SelectMany(c => c.Definitions)
|
||||
.OfType<BoundLocalFuncDefinitionNode>();
|
||||
}
|
||||
|
||||
public IEnumerable<BoundExternFuncDefinitionNode> GetExternFunctions()
|
||||
{
|
||||
return _syntaxTrees
|
||||
.SelectMany(c => c.Definitions)
|
||||
.OfType<BoundExternFuncDefinitionNode>();
|
||||
}
|
||||
|
||||
public IEnumerable<BoundTraitDefinitionNode> GetTraits()
|
||||
{
|
||||
return _syntaxTrees
|
||||
.SelectMany(c => c.Definitions)
|
||||
.OfType<BoundTraitDefinitionNode>();
|
||||
}
|
||||
|
||||
public IEnumerable<BoundTraitImplementationDefinitionNode> GetTraitImplementations()
|
||||
{
|
||||
return _syntaxTrees
|
||||
.SelectMany(c => c.Definitions)
|
||||
.OfType<BoundTraitImplementationDefinitionNode>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user