Skip to content

Commit

Permalink
fix Dict syntax deprecation warnings
Browse files Browse the repository at this point in the history
somehow the one for `[a=>b]` stopped working entirely
  • Loading branch information
JeffBezanson committed Nov 3, 2014
1 parent 604b74a commit 2ee90e8
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/julia-parser.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1508,8 +1508,9 @@
(take-token s)
(parse-dict-comprehension s first closer))
(else
(if (and (pair? isdict) (car isdict))
(syntax-deprecation-warning s "[a=>b, ...]" "Dict(a=>b, ...)"))
(if (or (and (pair? isdict) (not (car isdict)))
(null? isdict))
(syntax-deprecation-warning s "[a=>b, ...]" "Dict(a=>b, ...)"))
(parse-dict s first closer)))
(case (peek-token s)
((#\,)
Expand Down Expand Up @@ -1784,15 +1785,13 @@
((eqv? t #\{ )
(take-token s)
(if (eqv? (require-token s) #\})
(begin
(syntax-deprecation-warning s "{}" "[]")
(take-token s)
(begin (syntax-deprecation-warning s "{}" "[]")
(take-token s)
'(cell1d))
(let ((vex (parse-cat s #\})))
(let ((vex (parse-cat s #\} #t)))
(if (null? vex)
(begin
(syntax-deprecation-warning s "{}" "[]")
'(cell1d))
(begin (syntax-deprecation-warning s "{}" "[]")
'(cell1d))
(case (car vex)
((comprehension)
(syntax-deprecation-warning s "{a for a in b}" "Any[a for a in b]")
Expand Down

0 comments on commit 2ee90e8

Please sign in to comment.