git-svn-id: svn://db.shs.com.ru/pip@553 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-11-17 11:54:54 +00:00
parent 606261c38d
commit 6cbe77c5b6
7 changed files with 121 additions and 36 deletions

View File

@@ -66,9 +66,11 @@ public:
Member() {
visibility = Global;
size = 0;
bits = -1;
is_type_ptr = false;
attributes = NoAttributes;
}
const bool isBitfield() const {return bits > 0;}
PIString type;
PIString name;
PIStringList arguments_full;
@@ -77,20 +79,25 @@ public:
Attributes attributes;
bool is_type_ptr;
int size;
int bits;
};
struct PIP_EXPORT Entity {
Entity() {
visibility = Global;
has_name = true;
size = 0;
parent_scope = 0;
}
PIString type;
PIString name;
PIString file;
Visibility visibility;
int size;
bool has_name;
Entity * parent_scope;
PIVector<Entity * > parents;
//PIVector<Entity * > children;
PIVector<Entity * > children;
PIVector<Member> functions;
PIVector<Member> members;
PIVector<Typedef> typedefs;
@@ -130,10 +137,11 @@ private:
bool parseFileContent(PIString & fc, bool main);
bool parseDirective(PIString d);
Entity * parseClassDeclaration(const PIString & fc);
PIString parseClass(PIString & fc);
bool parseEnum(const PIString & name, PIString fc);
PIString parseClass(Entity * parent, PIString & fc);
bool parseEnum(Entity * parent, const PIString & name, PIString fc);
Typedef parseTypedef(PIString fc);
bool parseMember(Entity * parent, PIString & fc);
int extractMemberBits(PIString & fc);
void restoreTmpTemp(Member * e);
bool macroCondition(const PIString & mif, PIString mifcond);
bool isDefineExists(const PIString & dn);
@@ -144,7 +152,7 @@ private:
bool isMainFile(const PIString & fc);
void normalizeEntityNamespace(PIString & n);
int macros_iter;
int macros_iter, anon_num;
bool with_includes;
PIEvaluator evaluator;
//PIVector<Entity * > tree;