Skip to content

Commit

Permalink
Do not look pass newline when parsing syntactic unary operator. Fix J…
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyichao authored and tkelman committed Jun 6, 2015
1 parent e741b8e commit 6009ad0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/julia-parser.scm
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,8 @@
(let ((op (peek-token s)))
(if (syntactic-unary-op? op)
(begin (take-token s)
(cond ((closing-token? (peek-token s)) op)
(cond ((let ((next (peek-token s)))
(or (closing-token? next) (newline? next))) op)
((memq op '(& |::|)) (list op (parse-call s)))
(else (list op (parse-unary-prefix s)))))
(parse-atom s))))
Expand Down

0 comments on commit 6009ad0

Please sign in to comment.