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

This commit is contained in:
2018-02-07 08:52:41 +00:00
parent beb23e5a50
commit 9a1c5deadd
175 changed files with 215 additions and 181 deletions

View File

@@ -4,7 +4,7 @@
/*
PIP - Platform Independent Primitives
C++ code parser
Copyright (C) 2017 Ivan Pelipenko peri4ko@yandex.ru
Copyright (C) 2018 Ivan Pelipenko peri4ko@yandex.ru
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -48,8 +48,8 @@ public:
typedef PIFlags<Attribute> Attributes;
typedef PIPair<PIString, PIString> Define;
typedef PIPair<PIString, PIString> Typedef;
typedef PIPair<PIString, int> Enumerator;
typedef PIMap<PIString, PIString> MetaMap;
struct PIP_EXPORT Macro {
Macro(const PIString & n = PIString(), const PIString & v = PIString(), const PIStringList & a = PIStringList()) {
name = n;
@@ -71,6 +71,7 @@ public:
attributes = NoAttributes;
}
const bool isBitfield() const {return bits > 0;}
MetaMap meta;
PIString type;
PIString name;
PIStringList arguments_full;
@@ -90,6 +91,7 @@ public:
size = 0;
parent_scope = 0;
}
MetaMap meta;
PIString type;
PIString name;
PIString file;
@@ -103,13 +105,21 @@ public:
PIVector<Member> members;
PIVector<Typedef> typedefs;
};
struct PIP_EXPORT EnumeratorInfo {
EnumeratorInfo(const PIString & n = PIString(), int v = 0) {name = n; value = v;}
MetaMap meta;
PIString name;
int value;
};
struct PIP_EXPORT Enum {
Enum(const PIString & n = PIString()) {
name = n;
}
MetaMap meta;
PIString name;
PIVector<Enumerator> members;
PIVector<EnumeratorInfo> members;
};
void parseFile(const PIString & file, bool follow_includes = true);