summaryrefslogtreecommitdiff
path: root/src/nodes/decl
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-12 17:10:43 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-12 17:10:43 +0300
commit5523103f7f9d0331c65b3c931533519d2d18c838 (patch)
tree526257773105c5a6b426fd916def6d31c6b02758 /src/nodes/decl
parent935220297043e59853d54697bdf51c96ac1d1812 (diff)
downloadparanucker-5523103f7f9d0331c65b3c931533519d2d18c838.tar.gz
paranucker-5523103f7f9d0331c65b3c931533519d2d18c838.tar.bz2
paranucker-5523103f7f9d0331c65b3c931533519d2d18c838.tar.xz
paranucker-5523103f7f9d0331c65b3c931533519d2d18c838.zip
Add parsing node FIELD_DECL.
Diffstat (limited to 'src/nodes/decl')
-rw-r--r--src/nodes/decl/field_decl.h56
-rw-r--r--src/nodes/decl/var_decl.h4
2 files changed, 59 insertions, 1 deletions
diff --git a/src/nodes/decl/field_decl.h b/src/nodes/decl/field_decl.h
new file mode 100644
index 0000000..4129b4b
--- /dev/null
+++ b/src/nodes/decl/field_decl.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2015 Andrei Karas
+ *
+ * This file is part of AstDumper.
+ *
+ * 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
+ * the Free Software Foundation; either version 3 of the License, or
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NODES_DECL_FIELDDECLNODE_H
+#define NODES_DECL_FIELDDECLNODE_H
+
+#include "nodes/base/decl.h"
+
+#include "nodes/base/type.h"
+
+#include "nodes/cst/integer_cst.h"
+
+#include <string>
+
+struct FieldDeclNode : public DeclNode
+{
+ FieldDeclNode() :
+ DeclNode(),
+ declSize(nullptr),
+ declBitType(nullptr),
+ initial(nullptr),
+ qualifier(nullptr),
+ isBitField(false),
+ isUnsigned(false),
+ isVirtual(false),
+ isBitPacked(false)
+ {
+ }
+
+ IntegerCstNode *declSize;
+ TypeNode *declBitType;
+ Node *initial;
+ Node *qualifier;
+ bool isBitField;
+ bool isUnsigned;
+ bool isVirtual;
+ bool isBitPacked;
+};
+
+#endif // NODES_DECL_FIELDDECLNODE_H
diff --git a/src/nodes/decl/var_decl.h b/src/nodes/decl/var_decl.h
index 05a3efe..3b34e46 100644
--- a/src/nodes/decl/var_decl.h
+++ b/src/nodes/decl/var_decl.h
@@ -36,7 +36,8 @@ struct VarDeclNode : public DeclNode
initial(nullptr),
isStatic(false),
isRegister(false),
- isUsed(false)
+ isUsed(false),
+ isVirtual(false)
{
}
@@ -46,6 +47,7 @@ struct VarDeclNode : public DeclNode
bool isStatic;
bool isRegister;
bool isUsed;
+ bool isVirtual;
};
#endif // NODES_DECL_VARDECLNODE_H