diff --git a/src/ljl_expressions.jl b/src/ljl_expressions.jl index 25b80e3e..ef450431 100644 --- a/src/ljl_expressions.jl +++ b/src/ljl_expressions.jl @@ -30,22 +30,25 @@ end export parse_ljlexpr -const ljl_expr_allowed_heads = [:., :ref, :call, :macrocall, :||, :&&, :comparison, :if] +const ljl_expr_allowed_heads = Symbol[:., :ref, :call, :macrocall, :||, :&&, :comparison, :if] -const ljl_expr_allowed_funcs = Set([ +const ljl_expr_allowed_funcs = Set{Symbol}([ :!, :(==), :<, :>, :>=, :<=, :!=, :isapprox, :≈, :≈, :in, :∈, :.., - :+, :-, :*, :/, + :+, :-, :*, :/, :div, :rem, :mod, + :|, :&, :xor, :^, :sqrt, :one, :zero, :identity, :abs, :abs2, :normalize, :norm, :exp, :exp2, :exp10, :log, :log2, :log10, :sin, :cos, :tan, :asin, :acos, :atan, + :min, :max, :isnan, :isinf, :isfinite, :all, :any, :broadcast, - :get, :getproperty, + :sum, :prod, :minimum, :maximum, :mean, + :get, :getproperty, :getindex, :haskey, :length, :isempty, :value, :uncertainty, :stdscore, :weightedmean, :±, :(:), :Symbol, :String, :Int, :Float64, :Bool, @@ -53,7 +56,7 @@ const ljl_expr_allowed_funcs = Set([ :DetectorId, :ChannelId ]) -const _ljlexpr_units = IdDict([ +const _ljlexpr_units = IdDict{Symbol,Expr}([ :s => :(u"s"), :ms => :(u"ms"), :μs => :(u"μs"),