Skip to content

Commit f90a12a

Browse files
committed
parse assignment as keyword args inside indexing
fixes #25631
1 parent fc715b9 commit f90a12a

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/julia-parser.scm

+1-1
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@
11851185
(if (null? al)
11861186
(loop (list 'ref ex))
11871187
(case (car al)
1188-
((vect) (loop (list* 'ref ex (cdr al))))
1188+
((vect) (loop (list* 'ref ex (map =-to-kw (cdr al)))))
11891189
((hcat) (loop (list* 'typed_hcat ex (cdr al))))
11901190
((vcat)
11911191
(loop (list* 'typed_vcat ex (cdr al))))

src/julia-syntax.scm

-4
Original file line numberDiff line numberDiff line change
@@ -1954,8 +1954,6 @@
19541954
(let ((a (cadr lhs))
19551955
(idxs (cddr lhs))
19561956
(rhs (caddr e)))
1957-
(if (any assignment? idxs)
1958-
(syntax-deprecation "assignment inside indexing" "" #f))
19591957
(let* ((reuse (and (pair? a)
19601958
(contains (lambda (x) (eq? x 'end))
19611959
idxs)))
@@ -2010,8 +2008,6 @@
20102008
'ref
20112009
(lambda (e)
20122010
(let ((args (cddr e)))
2013-
(if (any assignment? args)
2014-
(syntax-deprecation "assignment inside indexing" "" #f))
20152011
(if (has-parameters? args)
20162012
(error "unexpected semicolon in array expression")
20172013
(expand-forms (partially-expand-ref e)))))

0 commit comments

Comments
 (0)