Skip to content

Commit

Permalink
=Update to 0.6, triangular dispatch fix makes things nice
Browse files Browse the repository at this point in the history
  • Loading branch information
oxinabox committed Sep 13, 2017
1 parent b162b55 commit e2ce4ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
julia 0.5-
julia 0.6
LaTeXStrings
DocStringExtensions

17 changes: 8 additions & 9 deletions src/mathast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,34 @@
#######################
# MathAST Definitions

abstract MathExpressionFragment
abstract type MathExpressionFragment end

immutable MathSequence <:MathExpressionFragment
struct MathSequence <:MathExpressionFragment
fragments::Vector{MathExpressionFragment}
end


typealias MathSymbolInner Union{Base.BitInteger.types..., Float16, Float32, Float64, Symbol}
immutable MathSymbol{T<:MathSymbolInner} <: MathExpressionFragment
const MathSymbolInner = Union{Number, Symbol}
struct MathSymbol{T<:MathSymbolInner} <: MathExpressionFragment
sym::T
end

immutable MathFrac <: MathExpressionFragment
struct MathFrac <: MathExpressionFragment
numer::MathExpressionFragment
denom::MathExpressionFragment
end

immutable MathSuperscript <: MathExpressionFragment
struct MathSuperscript <: MathExpressionFragment
base::MathExpressionFragment
expo::MathExpressionFragment
end

immutable MathFunctionCall <: MathExpressionFragment
struct MathFunctionCall <: MathExpressionFragment
fname::Symbol
#args::Vector{MathExpressionFragment}
arg::MathSequence
end

immutable MathMatrix <: MathExpressionFragment
struct MathMatrix <: MathExpressionFragment
mat::Matrix{MathExpressionFragment}
end

0 comments on commit e2ce4ee

Please sign in to comment.