Skip to content
Snippets Groups Projects
Verified Commit a1a25ee9 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Support any type of MC header entry

parent 016d0b5a
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,7 @@ Base.propertynames(h::MCHeader) = Symbol.(keys(h._raw))
function Base.getproperty(h::MCHeader, s::Symbol)
s == :_raw && return getfield(h, s)
if s propertynames(h)
values = Union{AbstractString, Missing}[tonumifpossible(v) for v split(strip(h._raw[String(s)]))]
values = Any[tonumifpossible(v) for v split(strip(h._raw[String(s)]))]
if s keys(MCHEADERDEF)
fieldnames = collect(MCHEADERDEF[s])
# fill up with missing if not all fields are provided
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment