• Colomban Wendling's avatar
    Fix the symbols tree hierarchy when several tags have the same name · 6522332b
    Colomban Wendling yazdı
    Fix the symbols tree hierarchy by considering the whole scope when
    adding a tag, avoiding choosing the wrong parent when several tags have
    the same name.  Until now, to avoid such misbehavior we only used to
    choose the parent candidate that appeared last (line-wise) before the
    child.  It works in most typical situations as generally tag names are
    fairly unique, and children appear right after their parent.
    
    However, there are cases that are trickier and cannot be handled that
    way.  In the following valid C++ snippet, it is impossible to know
    whether `function` should be listed under the namespace `A` or the
    class `A` without looking at its full scope:
    
    ```C++
    namespace A {
        namespace B {
            class A {
                void method() {}
            };
        };
        void function() {}
    };
    ```
    
    And it is a real-world problem for some parsers like the JSON parser
    that generates numeric indices for array elements name, often leading
    to several possibly close duplicates.
    
    Additionally, to prevent trying to set a tag as its own parent, the
    code guarded against accepting a parent if the child had the same name,
    lading to incorrect hierarchy for `method` in cases like this:
    
    ```C++
    namespace A {
        class A {
            void method() {}
        };
    };
    ```
    
    So to fix this, consider the whole hierarchy of a tag for choosing its
    parent, when that information is available from the parser.
    
    Fixes #1583.
    6522332b
Adı
Son kayıt (commit)
Son güncelleme
ctags Loading commit data...
data Loading commit data...
doc Loading commit data...
icons Loading commit data...
m4 Loading commit data...
plugins Loading commit data...
po Loading commit data...
scintilla Loading commit data...
scripts Loading commit data...
src Loading commit data...
tests Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
AUTHORS Loading commit data...
COMMITTERS Loading commit data...
COPYING Loading commit data...
ChangeLog Loading commit data...
ChangeLog.pre-1-22 Loading commit data...
HACKING Loading commit data...
INSTALL Loading commit data...
Makefile.am Loading commit data...
NEWS Loading commit data...
README Loading commit data...
README.I18N Loading commit data...
README.Packagers Loading commit data...
README.rst Loading commit data...
THANKS Loading commit data...
TODO Loading commit data...
autogen.sh Loading commit data...
configure.ac Loading commit data...
geany.desktop.in Loading commit data...
geany.exe.manifest Loading commit data...
geany.gladep Loading commit data...
geany.nsi.in Loading commit data...
geany.pc.in Loading commit data...
geany.spec.in Loading commit data...
geany_private.rc Loading commit data...