Skip to content

Commit 9c824f1

Browse files
committed
fix [;]
1 parent be5d02c commit 9c824f1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/components/lists.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ function parse_array(ps::ParseState, isref = false)
8585
dims = count_semicolons(ps)
8686
end
8787
push!(trivia, accept_rsquare(ps))
88-
if dims > 1
88+
if dims > 0
8989
ret = EXPR(:ncat, args, trivia)
9090
pushfirst!(ret, EXPR(Symbol(dims), 0, 0, ""))
9191
return ret

test/parser.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,7 @@ end
494494
end
495495
if VERSION > v"1.8-"
496496
@testset "ncat" begin
497+
@test "[;]" |> test_expr
497498
@test "[;;]" |> test_expr
498499
@test "[;;;;;;;]" |> test_expr
499500
@test "[x;;;;;]" |> test_expr

0 commit comments

Comments
 (0)