You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying out `macro_name_str` / `macro_name_cmd` in JuliaLowering it turns
out to be inconvenient to work with identifiers which change their
meaning due to being nested inside another construct.
This change revert to the previous use of StrMacroName / CmdMacroName
identifier kinds. macro_name is left as-is because it faithfully
represents the position of the `@`.
This isn't a complete reversion to the previous JuliaSyntax behavior.
Previously, SyntaxNode would contain the symbol `@x_str` for the string
macro `x` in `x"hi"` despite having kind set to `StrMacroName`.
However, appending the `_str` is best seen as a symbolic lowering (/name
mangling) step which isn't reflected in the source code and shouldn't be
the business of the parser or parser-related tools. Thus, in the code
here we defer this name mangling to the `Expr` conversion step instead,
and introduce `lower_identifier_name()` as a standard way to do this
conversion.
To go with these slightly modified semantics and to mimic the `_str` name mangling,
`StrMacroName` replaces the previous `StringMacroName`.
0 commit comments