mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Track issue.end_location properly
This commit is contained in:
parent
ad2c6bad0e
commit
9885457227
45 changed files with 90 additions and 20 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue