From 65799fdd3bf2d6a6043a045919315d2e3441cd6c Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Tue, 17 Aug 2021 13:49:58 -0600 Subject: [PATCH] Pass along end line --- src/spectator/dsl/groups.cr | 4 ++-- src/spectator/dsl/hooks.cr | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/spectator/dsl/groups.cr b/src/spectator/dsl/groups.cr index d4de441..002860c 100644 --- a/src/spectator/dsl/groups.cr +++ b/src/spectator/dsl/groups.cr @@ -41,7 +41,7 @@ module Spectator::DSL ::Spectator::DSL::Builder.start_group( _spectator_group_name(\{{what}}), - ::Spectator::Location.new(\{{block.filename}}, \{{block.line_number}}), + ::Spectator::Location.new(\{{block.filename}}, \{{block.line_number}}, \{{block.end_line_number}}), metadata ) @@ -96,7 +96,7 @@ module Spectator::DSL \%collection, \{{collection.stringify}}, \{{block.args.empty? ? :nil.id : block.args.first.stringify}}, - ::Spectator::Location.new(\{{block.filename}}, \{{block.line_number}}), + ::Spectator::Location.new(\{{block.filename}}, \{{block.line_number}}, \{{block.end_line_number}}), metadata ) diff --git a/src/spectator/dsl/hooks.cr b/src/spectator/dsl/hooks.cr index d11ff08..928b3ee 100644 --- a/src/spectator/dsl/hooks.cr +++ b/src/spectator/dsl/hooks.cr @@ -26,7 +26,7 @@ module Spectator::DSL {% end %} ::Spectator::DSL::Builder.{{type.id}}( - ::Spectator::Location.new(\{{block.filename}}, \{{block.line_number}}) + ::Spectator::Location.new(\{{block.filename}}, \{{block.line_number}}, \{{block.end_line_number}}) ) do {% if block %} %wrapper do |*args|