bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22241: 25.0.50; etags Ruby parser problems


From: Dmitry Gutov
Subject: bug#22241: 25.0.50; etags Ruby parser problems
Date: Sat, 26 Dec 2015 05:59:34 +0200

In GNU Emacs 25.0.50.5 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.7).

It's great that we've incorporated some Ruby support, but it has some
apparent problems:

- Constants are not indexed.

- Class methods (def self.foo) are given the wrong name ("self."
  shouldn't be included).

- "class << self" blocks are given a separate entry.

- Qualified tag names are never generated.

Take this example file:

module A
  class B
    ABC = 4

    def foo!
    end

    def self._bar?(abc)
    end

    class << self
      def qux=(tee)
      end
    end
  end
end

It should have this unqualified index:

A
B
ABC
foo!
_bar?
qux=

And the qualified names should look like this:

A
A::B
A::B::ABC
A::B#foo!
A::B.bar?
A::B.qux=

Lastly, it would be great if the parser recognized some built-in
code-generating methods. Example:

def A
  attr_reader :foo
  attr_writer :bar
  attr_accessor :tee
  alias_method :qux, :tee
end

should become (the unqualified version):

A
foo
bar=
tee
tee=
qux

All attr_* methods can take a variable number of arguments. The parser
should take each argument, check that it's a symbol and not a variable
(starts with :), and if so, record the corresponding method name.

Thanks!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]