Skip to content

Commit

Permalink
Allow additional function names in ljl_propfunc
Browse files Browse the repository at this point in the history
  • Loading branch information
oschulz committed Dec 4, 2024
1 parent 3e4b1db commit ac189c3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/ljl_expressions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ 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, :, :,
Expand All @@ -43,17 +43,19 @@ const ljl_expr_allowed_funcs = Set([
: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,
:value, :uncertainty, :stdscore, :weightedmean,
:±,
:(:), :Symbol, :String, :Int, :Float64, :Bool,
:string, :parse,
:DetectorId, :ChannelId
])

const _ljlexpr_units = IdDict([
const _ljlexpr_units = IdDict{Symbol,Expr}([
:s => :(u"s"),
:ms => :(u"ms"),
:μs => :(u"μs"),
Expand Down

0 comments on commit ac189c3

Please sign in to comment.