summaryrefslogtreecommitdiff
path: root/src/nodes
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-05 14:53:00 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-05 14:53:00 +0300
commit56df4c05e05f4ad0be6487298d43566be9bc0230 (patch)
treede1e90c8554e381952a47073ae91a58b0b94786d /src/nodes
parent20e38a593d6bbe0a6d85eab83831ae6363d5cddb (diff)
downloadparanucker-56df4c05e05f4ad0be6487298d43566be9bc0230.tar.gz
paranucker-56df4c05e05f4ad0be6487298d43566be9bc0230.tar.bz2
paranucker-56df4c05e05f4ad0be6487298d43566be9bc0230.tar.xz
paranucker-56df4c05e05f4ad0be6487298d43566be9bc0230.zip
Add parsing node INTEGER_TYPE.
Also fix negative numbers in INTEGER_CST node.
Diffstat (limited to 'src/nodes')
-rw-r--r--src/nodes/integertypenode.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/nodes/integertypenode.h b/src/nodes/integertypenode.h
new file mode 100644
index 0000000..088f2a7
--- /dev/null
+++ b/src/nodes/integertypenode.h
@@ -0,0 +1,52 @@
+/*
+ * 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_INTEGERTYPENODE_H
+#define NODES_INTEGERTYPENODE_H
+
+#include "nodes/integercstnode.h"
+
+#include "nodes/base/typenode.h"
+
+#include <string>
+
+struct IntegerTypeNode : public TypeNode
+{
+ IntegerTypeNode() :
+ TypeNode(),
+ typeSize(nullptr),
+ minValue(nullptr),
+ maxValue(nullptr),
+ precisionBits(0),
+ sizeBits(0),
+ isChar(false),
+ isUnsigned(false)
+ {
+ }
+
+ IntegerCstNode *typeSize;
+ IntegerCstNode *minValue;
+ IntegerCstNode *maxValue;
+ int precisionBits;
+ int sizeBits;
+ bool isChar;
+ bool isUnsigned;
+};
+
+#endif // NODES_INTEGERTYPENODE_H