Skip to content

Commit 306ab3d

Browse files
authored
Merge pull request #288 from YingboMa/myb/fix
Fix parsing `A[a~b]`
2 parents 3a56484 + b4861b6 commit 306ab3d

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/utils.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ function closer(ps::ParseState)
2828
(ps.closer.paren && kindof(ps.nt) === Tokens.RPAREN) ||
2929
(ps.closer.brace && kindof(ps.nt) === Tokens.RBRACE) ||
3030
(ps.closer.square && kindof(ps.nt) === Tokens.RSQUARE) ||
31-
(@static VERSION < v"1.4" ? false : ((ps.closer.insquare || ps.closer.inmacro) && kindof(ps.nt) === Tokens.APPROX && kindof(ps.nws) == EmptyWS)) ||
3231
kindof(ps.nt) === Tokens.ELSEIF ||
3332
kindof(ps.nt) === Tokens.ELSE ||
3433
kindof(ps.nt) === Tokens.CATCH ||

test/parser.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,7 @@ end""" |> test_expr
718718
if VERSION > v"1.1-"
719719
@test "a .~ b" |> test_expr
720720
end
721+
@test "A[a~b]" |> test_expr
721722
@test "1 .< 2 .< 3" |> test_expr
722723
@test "(;)" |> test_expr
723724
if VERSION > v"1.5"

0 commit comments

Comments
 (0)