File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ function _getindex(x::EXPR, i)
43
43
x. args[i]
44
44
elseif headof (x) === :export
45
45
oddt_evena (x, i)
46
+ elseif headof (x) === :public
47
+ oddt_evena (x, i)
46
48
elseif headof (x) === :filter
47
49
_filter (x, i)
48
50
elseif headof (x) === :flatten
Original file line number Diff line number Diff line change 744
744
@test x[6 ] === x. args[3 ]
745
745
end
746
746
747
+ if VERSION > v " 1.11-"
748
+ @testitem " :public" begin
749
+ using CSTParser: @cst_str , headof, valof
750
+
751
+ x = cst " public a, b, c"
752
+ @test length (x) == 6
753
+ @test x[1 ] === x. trivia[1 ]
754
+ @test x[2 ] === x. args[1 ]
755
+ @test x[3 ] === x. trivia[2 ]
756
+ @test x[4 ] === x. args[2 ]
757
+ @test x[5 ] === x. trivia[3 ]
758
+ @test x[6 ] === x. args[3 ]
759
+ end
760
+ end
761
+
747
762
@testitem " :parameters" begin
748
763
using CSTParser: @cst_str , headof, valof
749
764
You can’t perform that action at this time.
0 commit comments