diff options
-rw-r--r-- | src/Makefile.files | 4 | ||||
-rw-r--r-- | src/includes/nodeincludes.h | 1 | ||||
-rw-r--r-- | src/includes/nodeshandling.inc | 1 | ||||
-rw-r--r-- | src/includes/parserdefines.inc | 1 | ||||
-rw-r--r-- | src/nodes/expr/decl_expr.h | 35 | ||||
-rw-r--r-- | src/parsers/expr/decl_expr.cpp | 41 |
6 files changed, 82 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files index 4047bd5..1a17956 100644 --- a/src/Makefile.files +++ b/src/Makefile.files @@ -49,4 +49,6 @@ SRC = nodes/base/cst.h \ stringutils.cpp \ stringutils.h \ nodes/expr/bind_expr.h \ - parsers/expr/bind_expr.cpp
\ No newline at end of file + parsers/expr/bind_expr.cpp \ + nodes/expr/decl_expr.h \ + parsers/expr/decl_expr.cpp
\ No newline at end of file diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h index 2d4739e..dca72b0 100644 --- a/src/includes/nodeincludes.h +++ b/src/includes/nodeincludes.h @@ -13,3 +13,4 @@ #include "nodes/type/pointer_type.h" #include "nodes/type/void_type.h" #include "nodes/expr/bind_expr.h" +#include "nodes/expr/decl_expr.h" diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc index 8232117..6f5b67a 100644 --- a/src/includes/nodeshandling.inc +++ b/src/includes/nodeshandling.inc @@ -12,3 +12,4 @@ handleNodeType(IDENTIFIER_NODE, Identifier) handleNodeType(INTEGER_CST, IntegerCst) handleNodeType(STATEMENT_LIST, StatementList) handleNodeType(BIND_EXPR, BindExpr) +handleNodeType(DECL_EXPR, DeclExpr) diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc index ed84b8a..c8f2b1e 100644 --- a/src/includes/parserdefines.inc +++ b/src/includes/parserdefines.inc @@ -12,3 +12,4 @@ parserDefine(Identifier); parserDefine(IntegerCst); parserDefine(StatementList); parserDefine(BindExpr); +parserDefine(DeclExpr); diff --git a/src/nodes/expr/decl_expr.h b/src/nodes/expr/decl_expr.h new file mode 100644 index 0000000..01810de --- /dev/null +++ b/src/nodes/expr/decl_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_DECLEXPRNODE_H +#define NODES_EXPR_DECLEXPRNODE_H + +#include "nodes/base/expr.h" + +#include <string> + +struct DeclExprNode : public ExprNode +{ + DeclExprNode() : + ExprNode() + { + } +}; + +#endif // NODES_EXPR_DECLEXPRNODE_H diff --git a/src/parsers/expr/decl_expr.cpp b/src/parsers/expr/decl_expr.cpp new file mode 100644 index 0000000..78b4bbf --- /dev/null +++ b/src/parsers/expr/decl_expr.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(DeclExpr); + +#include "parsers/base/expr.h" + +#include "nodes/expr/decl_expr.h" + +namespace Generic +{ + +void parseDeclExprNode(DeclExprNode *node) +{ + fillType(node); + Log::log(node); + + fillExprOperands(node); + + // args 0 - DECL_EXPR_DECL +} + +} |