diff --git a/src/Runic.jl b/src/Runic.jl index 87a2710..1065a20 100644 --- a/src/Runic.jl +++ b/src/Runic.jl @@ -144,7 +144,7 @@ function Context( ) src_io = IOBuffer(src_str) src_tree = Node( - JuliaSyntax.parseall(JuliaSyntax.GreenNode, src_str; ignore_warnings = true), + JuliaSyntax.parseall(JuliaSyntax.GreenNode, src_str; ignore_warnings = true, version = v"2-"), ) fmt_io = IOBuffer() fmt_tree = nothing diff --git a/test/runtests.jl b/test/runtests.jl index d544c59..b005618 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -782,3 +782,10 @@ end @test format_string("f(a,\tb)") == "f(a, b)" @test format_string("begin\n\tx = 1\nend") == "begin\n x = 1\nend" end + +@testset "parsing new syntax" begin + # Check that it parses + @test format_string("public a,b") == "public a,b" + # But currently not actually getting formatted: + @test_broken format_string("public a,b") == "public a, b" +end