mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-21 19:43:03 +08:00
more fix in detecting file dependencies
if add the constant name into @defined and @referred in #on_const_path_ref, it might not detect dependencies.
This commit is contained in:
@@ -635,9 +635,25 @@ PLIST
|
||||
def on_const_path_ref(parent, args)
|
||||
type, name, position = args
|
||||
if type == :@const
|
||||
@defined << name
|
||||
@referred << name
|
||||
end
|
||||
args
|
||||
end
|
||||
|
||||
def on_module(const, *args)
|
||||
type, name = const
|
||||
if type == :@const
|
||||
@defined << name
|
||||
@referred.delete(name)
|
||||
end
|
||||
end
|
||||
|
||||
def on_class(const, *args)
|
||||
type, name = const
|
||||
if type == :@const
|
||||
@defined << name
|
||||
@referred.delete(name)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user