Line data Source code
1 7 : function __find_mesh_typestr(m) 2 7 : isnothing(m) && return "3" 3 : 4 : # NOTE: With current types we can just sort... 5 : 6 14 : s = collect(m) |> sort |> join 7 : 8 14 : isdigit(s[1]) && return s 9 : 10 2 : "3$(s)" 11 : end 12 : 13 7 : _find_mesh_typestr(m) = "PMesh.Types.MESH$(__find_mesh_typestr(m))" 14 : 15 : """ 16 : mt"3NT" === PMesh.Types.MESH3NT 17 : 18 : Generate *mesh template* (type) from string literal. 19 : """ 20 7 : macro mt_str(p) 21 7 : t = Meta.parse(_find_mesh_typestr(p)) 22 7 : return :($t) 23 : end