summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-13 19:19:51 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-13 19:19:51 +0300
commit1356e77d8e711acd06bee16911ec568902eca54d (patch)
tree119b7b9c178d808bf2e585f95f9af512aaa17555
parent70026dc811a06e9b8b26ca94e56a327ec29839a0 (diff)
downloadparanucker-1356e77d8e711acd06bee16911ec568902eca54d.tar.gz
paranucker-1356e77d8e711acd06bee16911ec568902eca54d.tar.bz2
paranucker-1356e77d8e711acd06bee16911ec568902eca54d.tar.xz
paranucker-1356e77d8e711acd06bee16911ec568902eca54d.zip
Add parsing node BREAK_STMT.
-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/stmt/break_stmt.h35
-rw-r--r--src/parsers/stmt/break_stmt.cpp37
6 files changed, 78 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files
index d3718cd..d0897f5 100644
--- a/src/Makefile.files
+++ b/src/Makefile.files
@@ -227,4 +227,6 @@ SRC = analysis/analysis.cpp \
nodes/expr/abs_expr.h \
parsers/expr/abs_expr.cpp \
nodes/cst/void_cst.h \
- parsers/cst/void_cst.cpp \ No newline at end of file
+ parsers/cst/void_cst.cpp \
+ nodes/stmt/break_stmt.h \
+ parsers/stmt/break_stmt.cpp \ No newline at end of file
diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h
index af3dd83..54e4298 100644
--- a/src/includes/nodeincludes.h
+++ b/src/includes/nodeincludes.h
@@ -93,3 +93,4 @@
#include "nodes/type/union_type.h"
#include "nodes/expr/abs_expr.h"
#include "nodes/cst/void_cst.h"
+#include "nodes/stmt/break_stmt.h"
diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc
index b3676d4..2b27be6 100644
--- a/src/includes/nodeshandling.inc
+++ b/src/includes/nodeshandling.inc
@@ -92,3 +92,4 @@ handleNodeType(STRING_CST, StringCst)
handleNodeType(UNION_TYPE, UnionType)
handleNodeType(ABS_EXPR, AbsExpr)
handleNodeType(VOID_CST, VoidCst)
+handleNodeType(BREAK_STMT, BreakStmt)
diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc
index a8f2a1f..6fe0456 100644
--- a/src/includes/parserdefines.inc
+++ b/src/includes/parserdefines.inc
@@ -92,3 +92,4 @@ parserDefine(StringCst);
parserDefine(UnionType);
parserDefine(AbsExpr);
parserDefine(VoidCst);
+parserDefine(BreakStmt);
diff --git a/src/nodes/stmt/break_stmt.h b/src/nodes/stmt/break_stmt.h
new file mode 100644
index 0000000..a64ff43
--- /dev/null
+++ b/src/nodes/stmt/break_stmt.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_STMT_BREAKSTMTNODE_H
+#define NODES_STMT_BREAKSTMTNODE_H
+
+#include "nodes/base/stmt.h"
+
+#include <string>
+
+struct BreakStmtNode : public StmtNode
+{
+ BreakStmtNode() :
+ StmtNode()
+ {
+ }
+};
+
+#endif // NODES_STMT_BREAKSTMTNODE_H
diff --git a/src/parsers/stmt/break_stmt.cpp b/src/parsers/stmt/break_stmt.cpp
new file mode 100644
index 0000000..0055835
--- /dev/null
+++ b/src/parsers/stmt/break_stmt.cpp
@@ -0,0 +1,37 @@
+/*
+ * 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(BreakStmt);
+
+#include "parsers/base/stmt.h"
+
+#include "nodes/stmt/break_stmt.h"
+
+namespace Generic
+{
+
+void parseBreakStmtNode(BreakStmtNode *node)
+{
+ fillType(node);
+ Log::dump(node);
+}
+
+}