commentscrystal-lang

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: =


Solution

  • 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.