From 7f7e432186e53a731406eecc802637370e096f7d Mon Sep 17 00:00:00 2001 From: Owen Lynch Date: Wed, 11 Oct 2023 16:45:19 -0700 Subject: [PATCH] coverage, docs --- docs/src/stdlib.md | 1 - src/util/MetaUtils.jl | 13 +------------ test/util/MetaUtils.jl | 2 ++ 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/docs/src/stdlib.md b/docs/src/stdlib.md index 4fd24cd9..7b76bc14 100644 --- a/docs/src/stdlib.md +++ b/docs/src/stdlib.md @@ -40,6 +40,5 @@ GATlab.Stdlib.StdTheories.ThIdLawlessCat Modules = [GATlab.Stdlib, GATlab.Stdlib.StdTheories, GATlab.Stdlib.StdModels, - GATlab.Stdlib.StdModels.FinSets, ] ``` diff --git a/src/util/MetaUtils.jl b/src/util/MetaUtils.jl index fa611e90..470866b1 100644 --- a/src/util/MetaUtils.jl +++ b/src/util/MetaUtils.jl @@ -4,7 +4,7 @@ module MetaUtils export JuliaFunction, setimpl, setname, JuliaFunctionSig, parse_docstring, parse_function, parse_function_sig, generate_docstring, generate_function, - append_expr!, concat_expr, replace_symbols, strip_lines, + concat_expr, replace_symbols, strip_lines, Expr0 using Base.Meta: ParseError @@ -159,17 +159,6 @@ end # Operations on Julia expressions ################################# -""" Append a Julia expression to a block expression. -""" -function append_expr!(block::Expr, expr)::Expr - @assert block.head == :block - @match expr begin - Expr(:block, args...) => append!(block.args, args) - _ => push!(block.args, expr) - end - block -end - """ Concatenate two Julia expressions into a block expression. """ function concat_expr(expr1::Expr, expr2::Expr)::Expr diff --git a/test/util/MetaUtils.jl b/test/util/MetaUtils.jl index 7716d526..0841b8f2 100644 --- a/test/util/MetaUtils.jl +++ b/test/util/MetaUtils.jl @@ -54,4 +54,6 @@ bindings = Dict((:r => :R, :s => :S, :t => :T)) @test replace_symbols(bindings, parse_fun(:(f(r,s) = r))) == parse_fun(:(f(R, S) = R)) +@test concat_expr(Expr(:block, :a), Expr(:block, :b)) == Expr(:block, :a, :b) + end