Skip to content

Commit ad110b9

Browse files
committed
Allow macrocall in function def syntax
Goes with JuliaLang/julia#55040
1 parent ae7d6ac commit ad110b9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/parser.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2102,6 +2102,10 @@ function parse_function_signature(ps::ParseState, is_function::Bool)
21022102
if peek(ps) != K"("
21032103
# function f() end ==> (function (call f))
21042104
parse_unary_prefix(ps)
2105+
if peek_behind(ps).kind == K"macrocall"
2106+
min_supported_version(v"1.12", ps, mark, "macrocall function sig")
2107+
needs_parse_call = false
2108+
end
21052109
else
21062110
# When an initial parenthesis is present, we need to distinguish
21072111
# between

0 commit comments

Comments
 (0)