GNU bug report logs - #22241
25.0.50; etags Ruby parser problems

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Sat, 26 Dec 2015 04:00:02 UTC

Severity: normal

Found in version 25.0.50

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 22241 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: dgutov <at> yandex.ru
Cc: 22241 <at> debbugs.gnu.org
Subject: Re: bug#22241: 25.0.50; etags Ruby parser problems
Date: Sat, 30 Jan 2016 14:21:13 +0200
> Date: Sun, 24 Jan 2016 17:44:44 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 22241 <at> debbugs.gnu.org
> 
> > Cc: 22241 <at> debbugs.gnu.org
> > From: Dmitry Gutov <dgutov <at> yandex.ru>
> > Date: Sun, 24 Jan 2016 00:43:21 +0300
> > 
> > On 01/23/2016 11:48 PM, Eli Zaretskii wrote:
> > 
> > >> ^[ \t]([A-Z][a-z0-9_])[ \t]*=[ \t]*
> > 
> >                          ^ I missed a * there.
> > 
> > >> ? Then record the first group, and simply don't look at what's being
> > >> assigned.
> > >
> > > That's possible, but is it good enough?  Does the above regexp
> > > necessarily mean it's a constant?
> > 
> > I think so. The important point is that its name begins with a capital 
> > letter.
> > 
> > And we should probably recognize assignments like these:
> > 
> > ModuleExample::CONSTANT = 5
> > 
> > The qualified name "ModuleExample::CONSTANT" if at the top level, 
> > unqualified name is "CONSTANT". When inside classes, modules or methods, 
> > only record the unqualified name; maybe disregard these assignments when 
> > inside methods altogether.
> 
> OK, thanks.  I will see what I can do with this.

Please take a look at the results of commit 25b79d7 on the emacs-25
branch.  I think I implemented everything except the optional name
qualification.  I hope the results are good enough.  If you agree,
please close the bug.

Of course, if there are still bugs, or the implementation doesn't
catch some use cases, please show them.

Thanks.




This bug report was last modified 9 years and 161 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.