summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-13 19:14:17 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-13 19:14:17 +0300
commit70026dc811a06e9b8b26ca94e56a327ec29839a0 (patch)
tree848a011ee7a72ed64186bd2eac22fc9d0b6a8e74
parent4b00ff827fd0531a3cd038e57e0a0f24d5171aa3 (diff)
downloadparanucker-70026dc811a06e9b8b26ca94e56a327ec29839a0.tar.gz
paranucker-70026dc811a06e9b8b26ca94e56a327ec29839a0.tar.bz2
paranucker-70026dc811a06e9b8b26ca94e56a327ec29839a0.tar.xz
paranucker-70026dc811a06e9b8b26ca94e56a327ec29839a0.zip
Add parsing node VOID_CST.
-rw-r--r--src/Makefile.files4
-rw-r--r--src/includes/nodeincludes.h1
-rw-r--r--src/includes/nodeshandling.inc1
-rw-r--r--src/includes/parserdefines.inc1
-rw-r--r--src/nodes/cst/void_cst.h35
-rw-r--r--src/parsers/cst/void_cst.cpp36
6 files changed, 77 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files
index f8cdce0..d3718cd 100644
--- a/src/Makefile.files
+++ b/src/Makefile.files
@@ -225,4 +225,6 @@ SRC = analysis/analysis.cpp \
nodes/type/union_type.h \
parsers/type/union_type.cpp \
nodes/expr/abs_expr.h \
- parsers/expr/abs_expr.cpp \ No newline at end of file
+ parsers/expr/abs_expr.cpp \
+ nodes/cst/void_cst.h \
+ parsers/cst/void_cst.cpp \ No newline at end of file
diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h
index 5eb442f..af3dd83 100644
--- a/src/includes/nodeincludes.h
+++ b/src/includes/nodeincludes.h
@@ -92,3 +92,4 @@
#include "nodes/cst/string_cst.h"
#include "nodes/type/union_type.h"
#include "nodes/expr/abs_expr.h"
+#include "nodes/cst/void_cst.h"
diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc
index 1a17924..b3676d4 100644
--- a/src/includes/nodeshandling.inc
+++ b/src/includes/nodeshandling.inc
@@ -91,3 +91,4 @@ handleNodeType(TRY_FINALLY_EXPR, TryFinallyExpr)
handleNodeType(STRING_CST, StringCst)
handleNodeType(UNION_TYPE, UnionType)
handleNodeType(ABS_EXPR, AbsExpr)
+handleNodeType(VOID_CST, VoidCst)
diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc
index 3e619fc..a8f2a1f 100644
--- a/src/includes/parserdefines.inc
+++ b/src/includes/parserdefines.inc
@@ -91,3 +91,4 @@ parserDefine(TryFinallyExpr);
parserDefine(StringCst);
parserDefine(UnionType);
parserDefine(AbsExpr);
+parserDefine(VoidCst);
diff --git a/src/nodes/cst/void_cst.h b/src/nodes/cst/void_cst.h
new file mode 100644
index 0000000..6c81ebe
--- /dev/null
+++ b/src/nodes/cst/void_cst.h
@@ -0,0 +1,35 @@
+/*
+ * 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_CST_VOIDCSTNODE_H
+#define NODES_CST_VOIDCSTNODE_H
+
+#include "nodes/base/cst.h"
+
+#include <string>
+
+struct VoidCstNode : public CstNode
+{
+ VoidCstNode() :
+ CstNode()
+ {
+ }
+};
+
+#endif // NODES_CST_VOIDCSTNODE_H
diff --git a/src/parsers/cst/void_cst.cpp b/src/parsers/cst/void_cst.cpp
new file mode 100644
index 0000000..c830ce4
--- /dev/null
+++ b/src/parsers/cst/void_cst.cpp
@@ -0,0 +1,36 @@
+/*
+ * 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/>.
+ */
+
+#include "includes/parserincludes.h"
+
+parserDefine(VoidCst);
+
+
+#include "nodes/cst/void_cst.h"
+
+namespace Generic
+{
+
+void parseVoidCstNode(VoidCstNode *node)
+{
+ fillType(node);
+ Log::dump(node);
+}
+
+}