tmm1 / ripper-tags

fast, accurate ctags generator for ruby source code using Ripper
MIT License
550 stars 43 forks source link

Not create tag for nested method #92

Open sphynx79 opened 5 years ago

sphynx79 commented 5 years ago

In some case in Ruby i use nested method same this:


# a.rb
class A
  def testInstanceA
    def testSubInstance
    end
  end

  def self.testClassA
  end
end

universal ctags make tag also for my nested method, but ripper-tgas no. ctags --languages=ruby

A   a.rb    /^class A$/;"   class   line:8  language:Ruby
B   b.rb    /^class B$/;"   class   line:8  language:Ruby
testClassA  a.rb    /^  def self.testClassA$/;" singletonMethod line:14 language:Ruby   class:A
testClassB  b.rb    /^  def self.testClassB$/;" singletonMethod line:12 language:Ruby   class:B
testInstanceA   a.rb    /^  def testInstanceA$/;"   method  line:9  language:Ruby   class:A
testInstanceB   b.rb    /^  def testInstanceB$/;"   method  line:9  language:Ruby   class:B
testSubInstance a.rb    /^    def testSubInstance$/;"   method  line:10 language:Ruby   method:A.testInstanceA

ripper-tags -R

A   a.rb    /^class A$/;"   c
B   b.rb    /^class B$/;"   c
testClassA  a.rb    /^  def self.testClassA$/;" F   class:A
testClassB  b.rb    /^  def self.testClassB$/;" F   class:B
testInstanceA   a.rb    /^  def testInstanceA$/;"   f   class:A
testInstanceB   b.rb    /^  def testInstanceB$/;"   f   class:B