surface se type is UNKNOWN if not specified.

This commit is contained in:
Jukka Aho
2017-01-05 09:23:16 +02:00
parent 169262ced3
commit d2d641a69d
+1 -1
View File
@@ -174,7 +174,7 @@ function parse_section(model, lines, key, idx_start, idx_end, ::Type{Val{:SURFAC
has_set_def = Dict(map(y -> lowercase(strip(y[1])) => strip(y[2]), map(x -> split(x, "="), matchall(r"([\w\_\-]+[ ]*=[ ]*[\w\_\-]+)", definition))))
has_set_def != nothing || return
debug(has_set_def)
set_type = Symbol(has_set_def["type"])
set_type = Symbol(get(has_set_def, "type", "UNKNOWN"))
set_name = Symbol(has_set_def["name"])
data = Vector{Tuple{Int64, Symbol}}()
for line in lines[idx_start + 1: idx_end]