We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4d68f48 + 12c69cb commit 0d43ed0Copy full SHA for 0d43ed0
src/components/keywords.jl
@@ -73,7 +73,7 @@ function parse_kw(ps::ParseState; is_toplevel = false)
73
elseif k === Tokens.PRIMITIVE
74
return @default ps parse_primitive(ps)
75
elseif k === Tokens.PUBLIC
76
- if is_toplevel && VERSION > v"1.11-"
+ if is_toplevel && !isemptyws(ps.ws) && VERSION > v"1.11-"
77
return @default ps parse_public(ps)
78
else
79
return EXPR(:IDENTIFIER, ps)
test/parser/test_keyword_blocks.jl
@@ -202,6 +202,8 @@ if VERSION > v"1.11-"
202
bar
203
""" |> test_expr
204
@test "f() = public" |> test_expr
205
+ @test "public(x) = 1" |> test_expr
206
+ @test "public(x)" |> test_expr
207
@test """
208
let
209
public
0 commit comments