Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crystal multi line comment

Are there any multi line comments in Crystal ? Such as Ruby does :

=begin
    this is a
    multiline
    comment in Ruby
=end

This will simply give me an error in Crystal :

unexpected token: =

like image 579
Matthieu Raynaud de Fitte Avatar asked Aug 06 '26 16:08

Matthieu Raynaud de Fitte


1 Answers

Crystal doesn't have multi-line comments. Simply prefix the block of lines you want to comment out with # single-line comments. Your editor should be able to do this for you.

like image 139
Stephie Avatar answered Aug 09 '26 12:08

Stephie