Extend etags Ruby support for accessors
* lib-src/etags.c (Ruby_functions): Support accessors defined with parentheses. (Bug#22563) * test/etags/ruby-src/test1.ru (A::B): Add tests for accessors defined with parentheses. * test/etags/ETAGS.good_1: * test/etags/ETAGS.good_2: * test/etags/ETAGS.good_3: * test/etags/ETAGS.good_4: * test/etags/ETAGS.good_5: * test/etags/ETAGS.good_6: * test/etags/CTAGS.good: Adapt to changes in Ruby tests.
This commit is contained in:
parent
aa35257118
commit
87ae21858a
9 changed files with 64 additions and 28 deletions
|
@ -4730,8 +4730,12 @@ Ruby_functions (FILE *inf)
|
|||
if (reader || writer || alias)
|
||||
{
|
||||
do {
|
||||
char *np = cp;
|
||||
char *np;
|
||||
|
||||
cp = skip_spaces (cp);
|
||||
if (*cp == '(')
|
||||
cp = skip_spaces (cp + 1);
|
||||
np = cp;
|
||||
cp = skip_name (cp);
|
||||
if (*np != ':')
|
||||
continue;
|
||||
|
|
|
@ -454,7 +454,7 @@ Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is privat
|
|||
Condition_Variable/t ada-src/2ataspri.ads /^ type Condition_Variable is$/
|
||||
Configure pyt-src/server.py /^class Configure(Frame, ControlEdit):$/
|
||||
ConfirmQuit pyt-src/server.py /^def ConfirmQuit(frame, context):$/
|
||||
Constant ruby-src/test1.ru 38
|
||||
Constant ruby-src/test1.ru 42
|
||||
ControlEdit pyt-src/server.py /^class ControlEdit(Frame):$/
|
||||
Controls pyt-src/server.py /^class Controls:$/
|
||||
CopyTextString pas-src/common.pas /^function CopyTextString;(*($/
|
||||
|
@ -2555,6 +2555,7 @@ bar c-src/c.c /^void bar() {while(0) {}}$/
|
|||
bar c.c 143
|
||||
bar c-src/h.h 19
|
||||
bar cp-src/x.cc /^XX::bar()$/
|
||||
bar1 ruby-src/test1.ru /^ attr_reader(:foo1, :bar1, # comment$/
|
||||
bar= ruby-src/test1.ru /^ attr_writer :bar,$/
|
||||
bas_syn prol-src/natded.prolog /^bas_syn(n(_)).$/
|
||||
base c-src/emacs/src/lisp.h 2188
|
||||
|
@ -3008,6 +3009,8 @@ foo f-src/entry.strange /^ character*(*) function foo()$/
|
|||
foo php-src/ptest.php /^foo()$/
|
||||
foo ruby-src/test1.ru /^ attr_reader :foo$/
|
||||
foo! ruby-src/test1.ru /^ def foo!$/
|
||||
foo1 ruby-src/test1.ru /^ attr_reader(:foo1, :bar1, # comment$/
|
||||
foo2 ruby-src/test1.ru /^ alias_method ( :foo2, #cmmt$/
|
||||
foobar c-src/c.c /^int foobar() {;}$/
|
||||
foobar c.c /^extern void foobar (void) __attribute__ ((section /
|
||||
foobar2 c-src/h.h 20
|
||||
|
@ -3880,7 +3883,8 @@ questo ../c/c.web 34
|
|||
quiettest make-src/Makefile /^quiettest:$/
|
||||
quit_char c-src/emacs/src/keyboard.c 192
|
||||
quit_throw_to_read_char c-src/emacs/src/keyboard.c /^quit_throw_to_read_char (bool from_signal)$/
|
||||
qux ruby-src/test1.ru /^ alias_method :qux, :tee, attr_accessor :bogus$/
|
||||
qux ruby-src/test1.ru /^ alias_method :qux, :tee, attr_accessor(:bogus)/
|
||||
qux1 ruby-src/test1.ru /^ :qux1)$/
|
||||
qux= ruby-src/test1.ru /^ def qux=(tee)$/
|
||||
r0 c-src/sysdep.h 54
|
||||
r1 c-src/sysdep.h 55
|
||||
|
|
|
@ -3061,7 +3061,7 @@ module ModuleExample1,0
|
|||
def module_instance_method46,1051
|
||||
def ModuleExample.module_class_methodmodule_class_method49,1131
|
||||
|
||||
ruby-src/test1.ru,785
|
||||
ruby-src/test1.ru,935
|
||||
class A1,0
|
||||
def a(2,8
|
||||
def b(5,38
|
||||
|
@ -3084,9 +3084,13 @@ module A9,57
|
|||
attr_accessor :teetee31,382
|
||||
attr_accessor :teetee=31,382
|
||||
alias_method :qux,qux32,405
|
||||
alias_method :xyz,xyz33,455
|
||||
:tee ; attr_reader :subtlesubtle34,478
|
||||
A::Constant Constant38,533
|
||||
alias_method :xyz,xyz33,456
|
||||
:tee ; attr_reader :subtlesubtle34,479
|
||||
attr_reader(:foo1,foo135,523
|
||||
attr_reader(:foo1, :bar1,bar135,523
|
||||
:qux1)qux136,563
|
||||
alias_method ( :foo2,foo237,586
|
||||
A::Constant Constant42,655
|
||||
|
||||
tex-src/testenv.tex,52
|
||||
\newcommand{\nm}\nm4,77
|
||||
|
|
|
@ -3631,7 +3631,7 @@ module ModuleExample1,0
|
|||
def module_instance_method46,1051
|
||||
def ModuleExample.module_class_methodmodule_class_method49,1131
|
||||
|
||||
ruby-src/test1.ru,785
|
||||
ruby-src/test1.ru,935
|
||||
class A1,0
|
||||
def a(2,8
|
||||
def b(5,38
|
||||
|
@ -3654,9 +3654,13 @@ module A9,57
|
|||
attr_accessor :teetee31,382
|
||||
attr_accessor :teetee=31,382
|
||||
alias_method :qux,qux32,405
|
||||
alias_method :xyz,xyz33,455
|
||||
:tee ; attr_reader :subtlesubtle34,478
|
||||
A::Constant Constant38,533
|
||||
alias_method :xyz,xyz33,456
|
||||
:tee ; attr_reader :subtlesubtle34,479
|
||||
attr_reader(:foo1,foo135,523
|
||||
attr_reader(:foo1, :bar1,bar135,523
|
||||
:qux1)qux136,563
|
||||
alias_method ( :foo2,foo237,586
|
||||
A::Constant Constant42,655
|
||||
|
||||
tex-src/testenv.tex,52
|
||||
\newcommand{\nm}\nm4,77
|
||||
|
|
|
@ -3408,7 +3408,7 @@ module ModuleExample1,0
|
|||
def module_instance_method46,1051
|
||||
def ModuleExample.module_class_methodmodule_class_method49,1131
|
||||
|
||||
ruby-src/test1.ru,785
|
||||
ruby-src/test1.ru,935
|
||||
class A1,0
|
||||
def a(2,8
|
||||
def b(5,38
|
||||
|
@ -3431,9 +3431,13 @@ module A9,57
|
|||
attr_accessor :teetee31,382
|
||||
attr_accessor :teetee=31,382
|
||||
alias_method :qux,qux32,405
|
||||
alias_method :xyz,xyz33,455
|
||||
:tee ; attr_reader :subtlesubtle34,478
|
||||
A::Constant Constant38,533
|
||||
alias_method :xyz,xyz33,456
|
||||
:tee ; attr_reader :subtlesubtle34,479
|
||||
attr_reader(:foo1,foo135,523
|
||||
attr_reader(:foo1, :bar1,bar135,523
|
||||
:qux1)qux136,563
|
||||
alias_method ( :foo2,foo237,586
|
||||
A::Constant Constant42,655
|
||||
|
||||
tex-src/testenv.tex,52
|
||||
\newcommand{\nm}\nm4,77
|
||||
|
|
|
@ -3225,7 +3225,7 @@ module ModuleExample1,0
|
|||
def module_instance_method46,1051
|
||||
def ModuleExample.module_class_methodmodule_class_method49,1131
|
||||
|
||||
ruby-src/test1.ru,785
|
||||
ruby-src/test1.ru,935
|
||||
class A1,0
|
||||
def a(2,8
|
||||
def b(5,38
|
||||
|
@ -3248,9 +3248,13 @@ module A9,57
|
|||
attr_accessor :teetee31,382
|
||||
attr_accessor :teetee=31,382
|
||||
alias_method :qux,qux32,405
|
||||
alias_method :xyz,xyz33,455
|
||||
:tee ; attr_reader :subtlesubtle34,478
|
||||
A::Constant Constant38,533
|
||||
alias_method :xyz,xyz33,456
|
||||
:tee ; attr_reader :subtlesubtle34,479
|
||||
attr_reader(:foo1,foo135,523
|
||||
attr_reader(:foo1, :bar1,bar135,523
|
||||
:qux1)qux136,563
|
||||
alias_method ( :foo2,foo237,586
|
||||
A::Constant Constant42,655
|
||||
|
||||
tex-src/testenv.tex,52
|
||||
\newcommand{\nm}\nm4,77
|
||||
|
|
|
@ -4142,7 +4142,7 @@ module ModuleExample1,0
|
|||
def module_instance_method46,1051
|
||||
def ModuleExample.module_class_methodmodule_class_method49,1131
|
||||
|
||||
ruby-src/test1.ru,785
|
||||
ruby-src/test1.ru,935
|
||||
class A1,0
|
||||
def a(2,8
|
||||
def b(5,38
|
||||
|
@ -4165,9 +4165,13 @@ module A9,57
|
|||
attr_accessor :teetee31,382
|
||||
attr_accessor :teetee=31,382
|
||||
alias_method :qux,qux32,405
|
||||
alias_method :xyz,xyz33,455
|
||||
:tee ; attr_reader :subtlesubtle34,478
|
||||
A::Constant Constant38,533
|
||||
alias_method :xyz,xyz33,456
|
||||
:tee ; attr_reader :subtlesubtle34,479
|
||||
attr_reader(:foo1,foo135,523
|
||||
attr_reader(:foo1, :bar1,bar135,523
|
||||
:qux1)qux136,563
|
||||
alias_method ( :foo2,foo237,586
|
||||
A::Constant Constant42,655
|
||||
|
||||
tex-src/testenv.tex,52
|
||||
\newcommand{\nm}\nm4,77
|
||||
|
|
|
@ -4142,7 +4142,7 @@ module ModuleExample1,0
|
|||
def module_instance_method46,1051
|
||||
def ModuleExample.module_class_methodmodule_class_method49,1131
|
||||
|
||||
ruby-src/test1.ru,785
|
||||
ruby-src/test1.ru,935
|
||||
class A1,0
|
||||
def a(2,8
|
||||
def b(5,38
|
||||
|
@ -4165,9 +4165,13 @@ module A9,57
|
|||
attr_accessor :teetee31,382
|
||||
attr_accessor :teetee=31,382
|
||||
alias_method :qux,qux32,405
|
||||
alias_method :xyz,xyz33,455
|
||||
:tee ; attr_reader :subtlesubtle34,478
|
||||
A::Constant Constant38,533
|
||||
alias_method :xyz,xyz33,456
|
||||
:tee ; attr_reader :subtlesubtle34,479
|
||||
attr_reader(:foo1,foo135,523
|
||||
attr_reader(:foo1, :bar1,bar135,523
|
||||
:qux1)qux136,563
|
||||
alias_method ( :foo2,foo237,586
|
||||
A::Constant Constant42,655
|
||||
|
||||
tex-src/testenv.tex,52
|
||||
\newcommand{\nm}\nm4,77
|
||||
|
|
|
@ -29,9 +29,13 @@ module A
|
|||
:baz,
|
||||
:more
|
||||
attr_accessor :tee
|
||||
alias_method :qux, :tee, attr_accessor :bogus
|
||||
alias_method :qux, :tee, attr_accessor(:bogus)
|
||||
alias_method :xyz,
|
||||
:tee ; attr_reader :subtle
|
||||
attr_reader(:foo1, :bar1, # comment
|
||||
:qux1)
|
||||
alias_method ( :foo2, #cmmt
|
||||
:bar2)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue