Skip to content

Commit

Permalink
parse assignment as keyword args inside indexing
Browse files Browse the repository at this point in the history
fixes #25631
  • Loading branch information
JeffBezanson committed Aug 2, 2018
1 parent 9f7935d commit 81835ad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/julia-parser.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@
(if (null? al)
(loop (list 'ref ex))
(case (car al)
((vect) (loop (list* 'ref ex (cdr al))))
((vect) (loop (list* 'ref ex (map =-to-kw (cdr al)))))
((hcat) (loop (list* 'typed_hcat ex (cdr al))))
((vcat)
(loop (list* 'typed_vcat ex (cdr al))))
Expand Down
4 changes: 0 additions & 4 deletions src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1954,8 +1954,6 @@
(let ((a (cadr lhs))
(idxs (cddr lhs))
(rhs (caddr e)))
(if (any assignment? idxs)
(syntax-deprecation "assignment inside indexing" "" #f))
(let* ((reuse (and (pair? a)
(contains (lambda (x) (eq? x 'end))
idxs)))
Expand Down Expand Up @@ -2010,8 +2008,6 @@
'ref
(lambda (e)
(let ((args (cddr e)))
(if (any assignment? args)
(syntax-deprecation "assignment inside indexing" "" #f))
(if (has-parameters? args)
(error "unexpected semicolon in array expression")
(expand-forms (partially-expand-ref e)))))
Expand Down

0 comments on commit 81835ad

Please sign in to comment.