Is there a plan to impove the ctags parser?
Posted: Sun May 29, 2011 11:06 am
Hi eranif, thanks to your work, the ctags within codelite has supported basic function return value and class template.
But, I have a function return value problem.
Check the following test c++ code.
The Func2 symbol stored in codelite database is
Obviously, it miss some information like template parameter and add some useless symbol.
So I think, we can add a extra field which I call qualifiers to store the class template info and function return info.
For the above Func2 symbol, it's qualifiers field is "template<typename T1, typename T2> T1 *"
I think storing the original text(after -I replacement) is the first idea.
For the above test code, I think I also report some bugs...
Currently, I migrate the codelite database to python and work with vim successfully. So I have the above questions. I'm not familiar with the ctags.
Are you have a plan improve the ctags?
Best regards.
fanhe
But, I have a function return value problem.
Check the following test c++ code.
Code: Select all
class B {
public:
int b3;
};
namespace NS01
{
class A {
public:
int a1;
};
class B {
public:
A m_a;
int b1;
};
namespace NS02
{
class A {
public:
int aa;
};
class B {
public:
int bb;
class BB {
public:
int bb2;
};
};
}
template<typename T1, typename T2>
T1 *
Func()
{
return new T1;
}
B *
Func2()
{
return new B;
}
}
namespace NS02
{
class A {
public:
int a2;
};
class B {
public:
int b2;
};
class C {
public:
int c2;
};
}
//using namespace NS01;
int main(int argc, char **argv)
{
using namespace NS01::NS02;
using NS02::C;
namespace NS002 = NS01;
namespace NS003 = NS002::NS02;
using NS003::B;
using NS01::Func;
using NS01::Func2;
// using namespace NS02;
// namespace B = NS01::NS02;
// using NS01::NS02::B;
// B::BB bb;
A a1;
NS01::B b1;
B b2;
NS002::B b3;
NS003::B b4;
C c1;
a1; // -> aa
b1; // -> b1
b2; // -> bb
b3; // -> b1
b4; // -> bb
c1; // -> c2
b1.m_a.a1;
Func<B, short>()->bb; // -> bb
Func2()->b1;
return 0;
}
So I think, we can add a extra field which I call qualifiers to store the class template info and function return info.
For the above Func2 symbol, it's qualifiers field is "template<typename T1, typename T2> T1 *"
I think storing the original text(after -I replacement) is the first idea.
For the above test code, I think I also report some bugs...
Currently, I migrate the codelite database to python and work with vim successfully. So I have the above questions. I'm not familiar with the ctags.
Are you have a plan improve the ctags?
Best regards.
fanhe