summaryrefslogtreecommitdiff
path: root/src/nodes
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-06 17:33:35 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-06 17:39:42 +0300
commit00ee65902beac5b83a85cd5519c89323813b3d72 (patch)
tree02d7cc78c4692d309a55334a7725d8da92215a55 /src/nodes
parentef3bc73a57d35a9c398fad599dd758b7d9270d21 (diff)
downloadparanucker-00ee65902beac5b83a85cd5519c89323813b3d72.tar.gz
paranucker-00ee65902beac5b83a85cd5519c89323813b3d72.tar.bz2
paranucker-00ee65902beac5b83a85cd5519c89323813b3d72.tar.xz
paranucker-00ee65902beac5b83a85cd5519c89323813b3d72.zip
Impliment RETURN_EXPR parsing node. Also add base parsing for _EXPR nodes.
Diffstat (limited to 'src/nodes')
-rw-r--r--src/nodes/base/exprnode.h38
-rw-r--r--src/nodes/returnexprnode.h35
2 files changed, 73 insertions, 0 deletions
diff --git a/src/nodes/base/exprnode.h b/src/nodes/base/exprnode.h
new file mode 100644
index 0000000..79193fd
--- /dev/null
+++ b/src/nodes/base/exprnode.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_BASE_EXPRNODE_H
+#define NODES_BASE_EXPRNODE_H
+
+#include "nodes/base/node.h"
+
+#include <vector>
+
+struct ExprNode : public Node
+{
+ ExprNode() :
+ Node(),
+ args()
+ {
+ }
+
+ std::vector<Node*> args;
+};
+
+#endif // NODES_BASE_EXPRNODE_H
diff --git a/src/nodes/returnexprnode.h b/src/nodes/returnexprnode.h
new file mode 100644
index 0000000..2a8ead1
--- /dev/null
+++ b/src/nodes/returnexprnode.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_RETURNEXPRNODE_H
+#define NODES_RETURNEXPRNODE_H
+
+#include "nodes/base/exprnode.h"
+
+#include <string>
+
+struct ReturnExprNode : public ExprNode
+{
+ ReturnExprNode() :
+ ExprNode()
+ {
+ }
+};
+
+#endif // NODES_RETURNEXPRNODE_H