I am looking for a reliable method to validate structure field names. Structure code is generated based on user input.
I think about eval(), but…
x = :else exp = :($x = "Oops!"; print($x)) eval(exp) # -> Oops!
then i tried using Base.isidentifier(), but
Base.isidentifier(:else) # -> thue
this is not what i need.
If i will checking against a list of registered names, i will need a supporting this list.
try include("generated_field_name_test.jl") catch e # ... end