summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-13 19:25:39 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-13 19:25:39 +0300
commitebc04af9b4de6836fd3b718da8f54d9a036d291d (patch)
tree14861c6e8ca95a685ad709d537ab2709af25130d
parent0ded0bdb3afae52e5c645b20c4a0e6fdcf5a6284 (diff)
downloadparanucker-ebc04af9b4de6836fd3b718da8f54d9a036d291d.tar.gz
paranucker-ebc04af9b4de6836fd3b718da8f54d9a036d291d.tar.bz2
paranucker-ebc04af9b4de6836fd3b718da8f54d9a036d291d.tar.xz
paranucker-ebc04af9b4de6836fd3b718da8f54d9a036d291d.zip
Add parsing node LABEL_DECL.
-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/decl/label_decl.h35
-rw-r--r--src/parsers/decl/label_decl.cpp42
6 files changed, 83 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files
index f0767a0..cee98c8 100644
--- a/src/Makefile.files
+++ b/src/Makefile.files
@@ -231,4 +231,6 @@ SRC = analysis/analysis.cpp \
nodes/stmt/break_stmt.h \
parsers/stmt/break_stmt.cpp \
nodes/expr/compound_expr.h \
- parsers/expr/compound_expr.cpp \ No newline at end of file
+ parsers/expr/compound_expr.cpp \
+ nodes/decl/label_decl.h \
+ parsers/decl/label_decl.cpp \ No newline at end of file
diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h
index d8c2d55..c539a82 100644
--- a/src/includes/nodeincludes.h
+++ b/src/includes/nodeincludes.h
@@ -95,3 +95,4 @@
#include "nodes/cst/void_cst.h"
#include "nodes/stmt/break_stmt.h"
#include "nodes/expr/compound_expr.h"
+#include "nodes/decl/label_decl.h"
diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc
index 6eb589f..3797dcc 100644
--- a/src/includes/nodeshandling.inc
+++ b/src/includes/nodeshandling.inc
@@ -94,3 +94,4 @@ handleNodeType(ABS_EXPR, AbsExpr)
handleNodeType(VOID_CST, VoidCst)
handleNodeType(BREAK_STMT, BreakStmt)
handleNodeType(COMPOUND_EXPR, CompoundExpr)
+handleNodeType(LABEL_DECL, LabelDecl)
diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc
index f7fcf69..6c5d106 100644
--- a/src/includes/parserdefines.inc
+++ b/src/includes/parserdefines.inc
@@ -94,3 +94,4 @@ parserDefine(AbsExpr);
parserDefine(VoidCst);
parserDefine(BreakStmt);
parserDefine(CompoundExpr);
+parserDefine(LabelDecl);
diff --git a/src/nodes/decl/label_decl.h b/src/nodes/decl/label_decl.h
new file mode 100644
index 0000000..e128a4e
--- /dev/null
+++ b/src/nodes/decl/label_decl.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_DECL_LABELDECLNODE_H
+#define NODES_DECL_LABELDECLNODE_H
+
+#include "nodes/base/decl.h"
+
+#include <string>
+
+struct LabelDeclNode : public DeclNode
+{
+ LabelDeclNode() :
+ DeclNode()
+ {
+ }
+};
+
+#endif // NODES_DECL_LABELDECLNODE_H
diff --git a/src/parsers/decl/label_decl.cpp b/src/parsers/decl/label_decl.cpp
new file mode 100644
index 0000000..df1df44
--- /dev/null
+++ b/src/parsers/decl/label_decl.cpp
@@ -0,0 +1,42 @@
+/*
+ * 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(LabelDecl);
+
+#include "parsers/base/decl.h"
+
+#include "nodes/decl/label_decl.h"
+
+namespace Generic
+{
+
+void parseLabelDeclNode(LabelDeclNode *node)
+{
+ fillType(node);
+ fillLocation(node);
+ fillDeclLabel(node);
+ Log::dump(node);
+
+ fillDeclAutoGenerated(node);
+ fillDeclAttributes(node);
+}
+
+}