julia
a34ff205 - allow `Meta.parse` to take optional `filename` argument (#50224)

Commit
2 years ago
allow `Meta.parse` to take optional `filename` argument (#50224) Code analysis tools such as JET.jl use `Meta.parse` to get a Julia code representation from textual data, or to display diagnostic messages when the input data is invalid. In such scenario it would be beneficial if these diagnostic messages could refer to the original file name of the input data. This commit allows `Meta.parse` to accept the optional `filename::AbstractString` argument for this purpose. If an error occurs, the `filename` can be included in the diagnostic information. The default value is set to `"none"`, thus preserving existing behavior.
Author
Parents
Loading