Skip to content

[JuliaLowering] Reconstruct macro name before, not during, macro expansion#60170

Merged
topolarity merged 4 commits intoJuliaLang:masterfrom
mlechu:rehydrate-macro-name
Dec 4, 2025
Merged

[JuliaLowering] Reconstruct macro name before, not during, macro expansion#60170
topolarity merged 4 commits intoJuliaLang:masterfrom
mlechu:rehydrate-macro-name

Conversation

@mlechu
Copy link
Copy Markdown
Member

@mlechu mlechu commented Nov 19, 2025

On top of #60162. This simplification lets macro expansion handle the macro name as an identifier rather than the nonterminal K"macro_name" node. That and the old MacroName node (as well as CmdMacroName, StrMacroName) are mainly the result of restrictions on raw parser output: we can't parse @Base.x to a non-contiguous @x, even though that's what we want in the AST in almost every case.

@mlechu mlechu added the compiler:lowering Syntax lowering (compiler front end, 2nd stage) label Nov 19, 2025
@mlechu mlechu requested a review from c42f November 19, 2025 00:53
@mlechu mlechu force-pushed the rehydrate-macro-name branch from 62e70e4 to da7b6dc Compare December 3, 2025 16:21
@topolarity topolarity added the needs tests Unit tests are required for this change label Dec 3, 2025
mlechu and others added 3 commits December 3, 2025 16:52
Co-authored-by: Cody Tapscott <topolarity@tapscott.me>
- StyledStrings, Markdown, JuliaSyntaxHighlighting, and Profile now pass
- Include REPLExt and SparseArraysExt
@mlechu mlechu force-pushed the rehydrate-macro-name branch from 622dd39 to baa4c07 Compare December 4, 2025 17:12
@mlechu mlechu removed the needs tests Unit tests are required for this change label Dec 4, 2025
@mlechu mlechu marked this pull request as ready for review December 4, 2025 17:24
Copy link
Copy Markdown
Member

@topolarity topolarity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another nice simplification. Thanks, @mlechu !

@topolarity topolarity merged commit f163ed8 into JuliaLang:master Dec 4, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:lowering Syntax lowering (compiler front end, 2nd stage)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants