summaryrefslogtreecommitdiff
path: root/src/nodes
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-07 02:25:35 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-07 02:25:35 +0300
commit070a91cfa376da74c781bd7a152785b103e00eea (patch)
tree55cdf71a4f80644ff549d2ba2dd96226fb773900 /src/nodes
parent7eb56f6af85b0bbbea17d0265ac489373cfbfd2d (diff)
downloadparanucker-070a91cfa376da74c781bd7a152785b103e00eea.tar.gz
paranucker-070a91cfa376da74c781bd7a152785b103e00eea.tar.bz2
paranucker-070a91cfa376da74c781bd7a152785b103e00eea.tar.xz
paranucker-070a91cfa376da74c781bd7a152785b103e00eea.zip
Add node type VAR_DECL.
Diffstat (limited to 'src/nodes')
-rw-r--r--src/nodes/decl/var_decl.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/nodes/decl/var_decl.h b/src/nodes/decl/var_decl.h
new file mode 100644
index 0000000..1e309d3
--- /dev/null
+++ b/src/nodes/decl/var_decl.h
@@ -0,0 +1,47 @@
+/*
+ * 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_VARDECLNODE_H
+#define NODES_DECL_VARDECLNODE_H
+
+#include "nodes/cst/integer_cst.h"
+
+#include "nodes/base/decl.h"
+#include "nodes/base/type.h"
+
+#include <string>
+
+struct VarDeclNode : public DeclNode
+{
+ VarDeclNode() :
+ DeclNode(),
+ declSize(nullptr),
+ varType(nullptr),
+ initial(nullptr),
+ isStatic(false)
+ {
+ }
+
+ IntegerCstNode *declSize;
+ TypeNode *varType;
+ Node *initial;
+ bool isStatic;
+};
+
+#endif // NODES_DECL_VARDECLNODE_H