Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/macros.cr
Original file line number Diff line number Diff line change
@@ -88,13 +88,13 @@ end
#
# ```
# a = 1
# pp a # prints "a = 1"
# pp a # prints "a # => 1"
#
# pp [1, 2, 3].map(&.to_s) # prints "[1, 2, 3].map(&.to_s) = ["1", "2", "3"]"
# pp [1, 2, 3].map(&.to_s) # prints "[1, 2, 3].map(&.to_s) # => ["1", "2", "3"]"
# ```
macro pp(*exps)
{% for exp in exps %}
::puts "#{ {{exp.stringify}} } = #{ ({{exp}}).inspect }"
::puts "#{ {{exp.stringify}} } # => #{ ({{exp}}).inspect }"
{% end %}
end

0 comments on commit d4f6b72

Please sign in to comment.