mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Set the ASTNode#visibility
as well
This commit is contained in:
parent
262e31c35b
commit
e12d72cc88
2 changed files with 3 additions and 1 deletions
|
@ -89,6 +89,8 @@ module Ameba::AST
|
|||
CRYSTAL
|
||||
rule.scopes.size.should eq 3
|
||||
rule.scopes.each &.visibility.should eq Crystal::Visibility::Private
|
||||
rule.scopes.last.node.visibility.should eq Crystal::Visibility::Private
|
||||
rule.scopes[0...-1].each &.node.visibility.should eq Crystal::Visibility::Public
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -73,7 +73,7 @@ module Ameba::AST
|
|||
|
||||
# :nodoc:
|
||||
def visit(node : Crystal::VisibilityModifier)
|
||||
@visibility_modifier = node.modifier
|
||||
@visibility_modifier = node.exp.visibility = node.modifier
|
||||
true
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue