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
expr = quote
function a!(b)
c = (
+d+
+e)
@f g = h
end
end
is parsed without errors by Julia, but the text
function a!(b)
c = (
+d+
+e)
@f g = h
end
chokes JuliaFormatter:
julia> text = "
function a!(b)
c = (
+d+
+e)
@f g = h
end
"
"\nfunction a!(b)\n c = (\n +d+\n +e)\n @f g = h\nend\n"
julia> format_text(text)
ERROR: Error while PARSING formatted text:
1
2 function a!(b)
3 c = (d + +e)
4 @fg = h
...
I have tried to trim down the reproduction case to something even smaller, but I have not managed. Interestingly, it seems that the additional + in the firs expression in the function makes the parser fuse the macro with the first symbol in the expression, but only if the first expression is split into multiple lines... what?
Tested on 1.43 - The expression
is parsed without errors by Julia, but the text
chokes JuliaFormatter:
I have tried to trim down the reproduction case to something even smaller, but I have not managed. Interestingly, it seems that the additional
+
in the firs expression in the function makes the parser fuse the macro with the first symbol in the expression, but only if the first expression is split into multiple lines... what?Might be related to #770?
The text was updated successfully, but these errors were encountered: