summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-06 23:34:38 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-06 23:34:38 +0300
commit99fa4be928bbe27c230f4ace452b85d0c91e3312 (patch)
tree7f936fb52e6feabb271018631046f3483363d9f9 /src
parent76355d5fc287544e22cf1da11a707bd96a642bba (diff)
downloadparanucker-99fa4be928bbe27c230f4ace452b85d0c91e3312.tar.gz
paranucker-99fa4be928bbe27c230f4ace452b85d0c91e3312.tar.bz2
paranucker-99fa4be928bbe27c230f4ace452b85d0c91e3312.tar.xz
paranucker-99fa4be928bbe27c230f4ace452b85d0c91e3312.zip
Add parsing node type BIND_EXPR.
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/expr/bind_expr.h35
-rw-r--r--src/parsers/expr/bind_expr.cpp43
6 files changed, 84 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files
index d26d0c7..4047bd5 100644
--- a/src/Makefile.files
+++ b/src/Makefile.files
@@ -47,4 +47,6 @@ SRC = nodes/base/cst.h \
logger.h \
plugin.cpp \
stringutils.cpp \
- stringutils.h \ No newline at end of file
+ stringutils.h \
+ nodes/expr/bind_expr.h \
+ parsers/expr/bind_expr.cpp \ No newline at end of file
diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h
index dc8b0c9..2d4739e 100644
--- a/src/includes/nodeincludes.h
+++ b/src/includes/nodeincludes.h
@@ -12,3 +12,4 @@
#include "nodes/type/integer_type.h"
#include "nodes/type/pointer_type.h"
#include "nodes/type/void_type.h"
+#include "nodes/expr/bind_expr.h"
diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc
index 6f9c2c4..8232117 100644
--- a/src/includes/nodeshandling.inc
+++ b/src/includes/nodeshandling.inc
@@ -11,3 +11,4 @@ handleNodeType(TREE_LIST, TreeList)
handleNodeType(IDENTIFIER_NODE, Identifier)
handleNodeType(INTEGER_CST, IntegerCst)
handleNodeType(STATEMENT_LIST, StatementList)
+handleNodeType(BIND_EXPR, BindExpr)
diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc
index 143f2bf..ed84b8a 100644
--- a/src/includes/parserdefines.inc
+++ b/src/includes/parserdefines.inc
@@ -11,3 +11,4 @@ parserDefine(TreeList);
parserDefine(Identifier);
parserDefine(IntegerCst);
parserDefine(StatementList);
+parserDefine(BindExpr);
diff --git a/src/nodes/expr/bind_expr.h b/src/nodes/expr/bind_expr.h
new file mode 100644
index 0000000..536d1c9
--- /dev/null
+++ b/src/nodes/expr/bind_expr.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_EXPR_BINDEXPRNODE_H
+#define NODES_EXPR_BINDEXPRNODE_H
+
+#include "nodes/base/expr.h"
+
+#include <string>
+
+struct BindExprNode : public ExprNode
+{
+ BindExprNode() :
+ ExprNode()
+ {
+ }
+};
+
+#endif // NODES_EXPR_BINDEXPRNODE_H
diff --git a/src/parsers/expr/bind_expr.cpp b/src/parsers/expr/bind_expr.cpp
new file mode 100644
index 0000000..b88c5f2
--- /dev/null
+++ b/src/parsers/expr/bind_expr.cpp
@@ -0,0 +1,43 @@
+/*
+ * 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(BindExpr);
+
+#include "parsers/base/expr.h"
+
+#include "nodes/expr/bind_expr.h"
+
+namespace Generic
+{
+
+void parseBindExprNode(BindExprNode *node)
+{
+ fillType(node);
+ Log::log(node);
+
+ fillExprOperands(node);
+
+ // args 0 - BIND_EXPR_VARS
+ // args 1 - BIND_EXPR_BODY
+ // args 2 - BIND_EXPR_BLOCK
+}
+
+}