summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-17 00:46:39 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-17 00:46:39 +0300
commitebea1825f3ad04450175043f4949b5e0db74e40e (patch)
treeb5662363fcec8fecf6f54030e98897bf3c30f986 /src
parent1c22be28854915b6b1e4172e4324a38d6afd4682 (diff)
downloadparanucker-ebea1825f3ad04450175043f4949b5e0db74e40e.tar.gz
paranucker-ebea1825f3ad04450175043f4949b5e0db74e40e.tar.bz2
paranucker-ebea1825f3ad04450175043f4949b5e0db74e40e.tar.xz
paranucker-ebea1825f3ad04450175043f4949b5e0db74e40e.zip
Add parsing node TEMPLATE_TYPE_PARM.
Diffstat (limited to 'src')
-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/templatetypeparm.h38
-rw-r--r--src/parsers/templatetypeparm.cpp41
6 files changed, 85 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files
index d2982cb..2e1e2a7 100644
--- a/src/Makefile.files
+++ b/src/Makefile.files
@@ -300,4 +300,6 @@ SRC = analysis/analysis.cpp \
nodes/stmt/switch_stmt.h \
parsers/stmt/switch_stmt.cpp \
nodes/targetoption.h \
- parsers/targetoption.cpp \ No newline at end of file
+ parsers/targetoption.cpp \
+ nodes/templatetypeparm.h \
+ parsers/templatetypeparm.cpp \ No newline at end of file
diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h
index 52bedcb..126da91 100644
--- a/src/includes/nodeincludes.h
+++ b/src/includes/nodeincludes.h
@@ -128,3 +128,4 @@
#include "nodes/expr/switch_expr.h"
#include "nodes/stmt/switch_stmt.h"
#include "nodes/targetoption.h"
+#include "nodes/templatetypeparm.h"
diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc
index 0df5b2c..15fbb9f 100644
--- a/src/includes/nodeshandling.inc
+++ b/src/includes/nodeshandling.inc
@@ -127,3 +127,4 @@ handleNodeType(STATIC_CAST_EXPR, StaticCastExpr)
handleNodeType(SWITCH_EXPR, SwitchExpr)
handleNodeType(SWITCH_STMT, SwitchStmt)
handleNodeType(TARGET_OPTION_NODE, TargetOption)
+handleNodeType(TEMPLATE_TYPE_PARM, TemplateTypeParm)
diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc
index 646238e..693b361 100644
--- a/src/includes/parserdefines.inc
+++ b/src/includes/parserdefines.inc
@@ -127,3 +127,4 @@ parserDefine(StaticCastExpr);
parserDefine(SwitchExpr);
parserDefine(SwitchStmt);
parserDefine(TargetOption);
+parserDefine(TemplateTypeParm);
diff --git a/src/nodes/templatetypeparm.h b/src/nodes/templatetypeparm.h
new file mode 100644
index 0000000..f4590cc
--- /dev/null
+++ b/src/nodes/templatetypeparm.h
@@ -0,0 +1,38 @@
+/*
+ * 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_TEMPLATETYPEPARMNODE_H
+#define NODES_TEMPLATETYPEPARMNODE_H
+
+#include "nodes/base/node.h"
+
+#include <string>
+
+struct TemplateTypeParmNode : public Node
+{
+ TemplateTypeParmNode() :
+ Node(),
+ index(nullptr)
+ {
+ }
+
+ Node *index;
+};
+
+#endif // NODES_TEMPLATETYPEPARMNODE_H
diff --git a/src/parsers/templatetypeparm.cpp b/src/parsers/templatetypeparm.cpp
new file mode 100644
index 0000000..d824bc6
--- /dev/null
+++ b/src/parsers/templatetypeparm.cpp
@@ -0,0 +1,41 @@
+/*
+ * 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(TemplateTypeParm);
+
+
+#include "nodes/templatetypeparm.h"
+
+namespace Generic
+{
+
+void parseTemplateTypeParmNode(TemplateTypeParmNode *node)
+{
+ fillType(node);
+ Log::dump(node);
+
+ node->index = createParseNode(
+ node,
+ TEMPLATE_TYPE_PARM_INDEX(node->gccNode),
+ "index");
+}
+
+}