From bbc144d1433809a191c4796e00080858fd196dbb Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Thu, 25 Jul 2024 00:22:06 +0200 Subject: [PATCH] Fix var-nodes in export/public lists --- src/runestone.jl | 2 +- test/runtests.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runestone.jl b/src/runestone.jl index 826a593..71d3b9c 100644 --- a/src/runestone.jl +++ b/src/runestone.jl @@ -974,7 +974,7 @@ function spaces_in_export_public(ctx::Context, node::Node) state = :expect_identifier elseif state === :expect_identifier state = :expect_comma - if kind(kid) in KSet"Identifier @ MacroName $" || JuliaSyntax.is_operator(kid) + if kind(kid) in KSet"Identifier @ MacroName $ var" || JuliaSyntax.is_operator(kid) any_changes && push!(kids′, kid) accept_node!(ctx, kid) if kind(kid) === K"@" diff --git a/test/runtests.jl b/test/runtests.jl index ef9b102..c8a8acf 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -841,7 +841,7 @@ end @test format_string("quote\nexport \$a, \$b\nend") == "quote\n export \$a, \$b\nend" @test_throws Exception format_string("export \$a") # Non-identifiers - @test format_string("export ^") == "export ^" + @test format_string("export ^, var\"x\"") == "export ^, var\"x\"" end @testset "parsing new syntax" begin