julia
ed2c4ced - [JuliaLowering] Clean up `nothing` representation (#61549)

Commit
11 days ago
[JuliaLowering] Clean up `nothing` representation (#61549) Fix https://github.com/JuliaLang/JuliaLowering.jl/issues/173 "the right way" by hopefully eliminating a footgun: SyntaxTree can now store the value `nothing` in an attribute, though in practice JL won't do this outside of K"Value", so things like `get(st, :name_val, nothing)` are still fine to do. `nothing::K"Value"` is a valid representation of `nothing` throughout lowering, but I've also added `K"nothing"` (analogous to flisp's `(null)` form) since lowering matches on it, and when we're peeking into `.value` or `.name_val` for a specific thing, we should usually be using a special form instead. This form is not valid before desugaring (it's converted from `nothing::K"Value"` in `est_to_dst`), so it shouldn't cause confusion in "new" macro expansion. --------- Co-authored-by: Cody Tapscott <topolarity@tapscott.me>
Author
Parents
Loading