From f6cea02e1c5839493610b9eac6a74696dd059112 Mon Sep 17 00:00:00 2001 From: Reuben Gardos Reid <5456207+ReubenJ@users.noreply.github.com> Date: Tue, 26 Nov 2024 19:15:11 +0300 Subject: [PATCH] Remove empty-child RuleNode and UniformHole constructors They are better-suited as functions in `HerbGrammar` --- src/rulenode.jl | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/rulenode.jl b/src/rulenode.jl index 5d0c166..b376ace 100644 --- a/src/rulenode.jl +++ b/src/rulenode.jl @@ -40,16 +40,6 @@ mutable struct RuleNode <: AbstractRuleNode children::Vector{AbstractRuleNode} end -function RuleNode(ind::Int, grammar::AbstractGrammar) - RuleNode( - ind, nothing, [Hole(get_domain(grammar, type)) for type in grammar.childtypes[ind]]) -end - -function RuleNode(ind::Int, _val::Any, grammar::AbstractGrammar) - RuleNode( - ind, _val, [Hole(get_domain(grammar, type)) for type in grammar.childtypes[ind]]) -end - """ AbstractHole <: AbstractRuleNode @@ -78,11 +68,6 @@ mutable struct UniformHole <: AbstractUniformHole children::Vector{AbstractRuleNode} end -function UniformHole(domain::BitVector, grammar::AbstractGrammar) - UniformHole(domain, - [Hole(get_domain(grammar, type)) for type in grammar.childtypes[findfirst(domain)]]) -end - """ Hole <: AbstractHole