Skip to content

Commit c7f5926

Browse files
committed
fix #15686, skip comments before first line number in type expressions
1 parent 64aa15d commit c7f5926

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/julia-parser.scm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,9 @@
11721172
(if (reserved-word? (peek-token s))
11731173
(error (string "invalid type name \"" (take-token s) "\"")))
11741174
(let ((sig (parse-subtype-spec s))
1175-
(loc (line-number-node s)))
1175+
(loc (begin (if (newline? (peek-token s))
1176+
(skip-ws-and-comments (ts:port s)))
1177+
(line-number-node s))))
11761178
(begin0 (list 'type (if (eq? word 'type) #t #f)
11771179
sig (add-filename-to-block! (parse-block s) loc))
11781180
(expect-end s word)))))

0 commit comments

Comments
 (0)