julia
2bcca656 - Remove some non-`Syntax` syntax versioning code (#65070)

Commit
4 hours ago
Remove some non-`Syntax` syntax versioning code (#65070) The original implementation of this in #60018 was insane, but fortunately, `Syntax` and JuliaLowering are strictly more insane, so we can remove some of the old system today. ## `@VERSION` I've just removed the macro in this PR given that we can now retrieve the edition of any module or piece of `Syntax`, and I can't think of any case where neither of those are known. However, if we really want, `@VERSION` should now be implementable without the parser treating it as a keyword, since all `Syntax` knows the information `@VERSION` needed a special case for. This also lets us remove `@VERSION`'s special macro signature and the special expansion code calling it. ## Expr(:module) I made the extra edition argument in the four-argument module form inoperative in #64730 (it's now inherited from the parent module). I was thinking we could replace it with the obvious equivalent and use the edition of the `Syntax` (like the argument, macros could change it), but I realized that (1) eval sees a module expression too late to change the edition it parsed with and (2) I think we would really regret supporting parsing in any edition, then marking the AST with any other edition before expanding/lowering it. I expect to specifically define forms where that's OK (`macro` in 1.14 and 1.15), but supporting it in general would mean every new thing out of parsing is valid in every old edition, and every parse result from any old edition is supported in every new edition. Assisted-by: Claude Opus 5.5
Author
Parents
Loading