bug-global
[Top][All Lists]
Advanced

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

Re: gtags bug: java annotations


From: Shigio YAMAGUCHI
Subject: Re: gtags bug: java annotations
Date: Wed, 9 Apr 2014 11:01:40 +0900

Hi,
I have added it to the Known bug list.
[http://www.gnu.org/software/global/bugs.html]

Thank you for the report!


2014-04-08 23:19 GMT+09:00 Gordon Grimes <address@hidden>:

Hi,

I’ve uncovered a problem with ‘gtags’ when parsing java that include “rich” annotations.

If you run gtags as described on the sample below you’ll see what I mean.

 

Thanks,

-ggrimes

 

 

// gtags version: gtags (GNU GLOBAL) 6.2.11

 

// Shell command: 

// % gtags.exe  -v ; gtags.exe  -v --dump GTAGS | sort -k4n

 

 

public class myClass

{

    // simple annotation; this works as expected: 'doit1' is indexed

 

    @myAnnotation

    public Something doit1()

    {

            return new Something();

    }

 

    // The addition of "=" in the annotation _expression_ confuses the parser

    // gtags indexes @myAnnotation, but not 'doit2'

    // (The parser wants to find a closing ";" .... see next)

 

    @myAnnotation(a=b)

    public Something doit2()

    {

            return new Something();

    }

 

    // adding a semicolon allows gtags to find 'doit3', but it still indexes @myAnnotation()

    // (of course we can’t simply add a “;” as the compiler will complain, but it demonstrates what

   //  gtags wants.)

 

    @myAnnotation(a=b) ;

    public Something doit3()

    {

            return new Something();

    }

 

}


_______________________________________________
Bug-global mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-global




--
Shigio YAMAGUCHI <address@hidden>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3

reply via email to

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