Skip to content

Commit

Permalink
refactor: expose AbstractStructuredExpression
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Oct 13, 2024
1 parent 47ea2a1 commit 818e7d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/DynamicExpressions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ import .ExpressionModule:
import .ParseModule: parse_leaf
@reexport import .ParametricExpressionModule: ParametricExpression, ParametricNode
@reexport import .StructuredExpressionModule: StructuredExpression
import .StructuredExpressionModule: AbstractStructuredExpression

@stable default_mode = "disable" begin
include("Interfaces.jl")
Expand Down
6 changes: 3 additions & 3 deletions src/StructuredExpression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import ..ExpressionModule:
set_scalar_constants!

abstract type AbstractStructuredExpression{
T,F<:Function,N<:AbstractExpressionNode{T},E<:AbstractExpression{T,N}
T,F<:Function,N<:AbstractExpressionNode{T},E<:AbstractExpression{T,N},D<:NamedTuple
} <: AbstractExpression{T,N} end

"""
StructuredExpression{T,F,N,E,TS,D} <: AbstractStructuredExpression{T,F,N,E} <: AbstractExpression{T,N}
StructuredExpression{T,F,N,E,TS,D} <: AbstractStructuredExpression{T,F,N,E,D} <: AbstractExpression{T,N}
This expression type allows you to combine multiple expressions
together in a predefined way.
Expand Down Expand Up @@ -78,7 +78,7 @@ struct StructuredExpression{
E<:AbstractExpression{T,N},
TS<:NamedTuple{<:Any,<:NTuple{<:Any,E}},
D<:@NamedTuple{structure::F, operators::O, variable_names::V} where {O,V},
} <: AbstractStructuredExpression{T,F,N,E}
} <: AbstractStructuredExpression{T,F,N,E,D}
trees::TS
metadata::Metadata{D}

Expand Down

0 comments on commit 818e7d2

Please sign in to comment.