Skip to content

Commit 11ad1fa

Browse files
committed
support #=# self-closing comments from #6128, but only because it requires less code
1 parent 317822b commit 11ad1fa

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

doc/stdlib/punctuation.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Extended documentation for mathematical symbols & functions is :ref:`here <mathe
1111
``!`` prefix "not" operator
1212
``a!( )`` at the end of a function name, `!` indicates that a function modifies its argument(s)
1313
``#`` begin single line comment
14-
``#=`` begin multiple line comment
15-
``=#`` end multiple line comment
14+
``#=`` begin multi-line comment
15+
``=#`` end multi-line comment
1616
``$`` xor operator, string and expression interpolation
1717
``%`` remainder operator
1818
``^`` exponent operator

src/julia-parser.scm

+2-3
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@
360360
(define (skip-multiline-comment port)
361361
(let ((c (read-char port)))
362362
(if (eof-object? c)
363-
(error "non-terminated multiline comment #= ... =#")
363+
(error "unterminated multi-line comment #= ... =#")
364364
(begin (if (eqv? c #\=)
365365
(let ((c (peek-char port)))
366366
(if (eqv? c #\#)
@@ -370,8 +370,7 @@
370370

371371
(read-char port) ; read # that was already peeked
372372
(if (eqv? (peek-char port) #\=)
373-
(begin (read-char port) ; read initial =
374-
(skip-multiline-comment port))
373+
(skip-multiline-comment port)
375374
(skip-to-eol port)))
376375

377376
(define (skip-ws-and-comments port)

0 commit comments

Comments
 (0)