Skip to content

Commit

Permalink
coverage, docs
Browse files Browse the repository at this point in the history
  • Loading branch information
olynch committed Oct 12, 2023
1 parent 78bd26e commit 7f7e432
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
1 change: 0 additions & 1 deletion docs/src/stdlib.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ GATlab.Stdlib.StdTheories.ThIdLawlessCat
Modules = [GATlab.Stdlib,
GATlab.Stdlib.StdTheories,
GATlab.Stdlib.StdModels,
GATlab.Stdlib.StdModels.FinSets,
]
```
13 changes: 1 addition & 12 deletions src/util/MetaUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions test/util/MetaUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7f7e432

Please sign in to comment.