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
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global

Reply via email to