heyx3 / Bplus.jl

A modern OpenGL 4.6 rendering framework, written in Julia.
Other
70 stars 3 forks source link

Make a better way of reporting Field DSL warnings #11

Open heyx3 opened 1 year ago

heyx3 commented 1 year ago

When parsing a Field DSL expression, sometimes warnings can be generated. Currently, they're dumped straight to the terminal (I assume stderr) with @warn.

A better way would be for the Fields.DslState struct to have some way of logging warnings, so the user can handle them however they want. Most likely what we want is to add a callback function to DslState, which defaults to using @warn.