Track issue.end_location properly

This commit is contained in:
Vitalii Elenhaupt 2018-11-24 19:38:13 +02:00
parent ad2c6bad0e
commit 9885457227
No known key found for this signature in database
GPG key ID: 7558EF3A4056C706
45 changed files with 90 additions and 20 deletions

View file

@ -14,9 +14,10 @@ module Ameba::AST
end
describe "delegation" do
it "delegates location to node" do
it "delegates locations to node" do
argument = Argument.new(arg, variable)
argument.location.should eq arg.location
argument.end_location.should eq arg.end_location
end
it "delegates to_s to node" do

View file

@ -22,9 +22,10 @@ module Ameba::AST
end
describe "delegation" do
it "delegates location" do
it "delegates locations" do
assignment = Assignment.new(node, variable)
assignment.location.should eq node.location
assignment.end_location.should eq node.end_location
end
it "delegates to_s" do

View file

@ -13,9 +13,10 @@ module Ameba::AST
end
describe "delegation" do
it "delegates location" do
it "delegates locations" do
variable = Variable.new(var_node, scope)
variable.location.should eq var_node.location
variable.end_location.should eq var_node.end_location
end
it "delegates name" do