Skip to content

Commit

Permalink
fix #15686, skip comments before first line number in type expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Mar 31, 2016
1 parent 64aa15d commit c7f5926
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/julia-parser.scm
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,9 @@
(if (reserved-word? (peek-token s))
(error (string "invalid type name \"" (take-token s) "\"")))
(let ((sig (parse-subtype-spec s))
(loc (line-number-node s)))
(loc (begin (if (newline? (peek-token s))
(skip-ws-and-comments (ts:port s)))
(line-number-node s))))
(begin0 (list 'type (if (eq? word 'type) #t #f)
sig (add-filename-to-block! (parse-block s) loc))
(expect-end s word)))))
Expand Down

0 comments on commit c7f5926

Please sign in to comment.