diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-13 19:21:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-13 19:21:40 +0300 |
commit | 0ded0bdb3afae52e5c645b20c4a0e6fdcf5a6284 (patch) | |
tree | 7f56df40af491d1ba467d83c66f01025ae5667ad | |
parent | 1356e77d8e711acd06bee16911ec568902eca54d (diff) | |
download | paranucker-0ded0bdb3afae52e5c645b20c4a0e6fdcf5a6284.tar.gz paranucker-0ded0bdb3afae52e5c645b20c4a0e6fdcf5a6284.tar.bz2 paranucker-0ded0bdb3afae52e5c645b20c4a0e6fdcf5a6284.tar.xz paranucker-0ded0bdb3afae52e5c645b20c4a0e6fdcf5a6284.zip |
Add parsing node COMPOUND_EXPR.
-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/compound_expr.h | 35 | ||||
-rw-r--r-- | src/parsers/expr/compound_expr.cpp | 40 |
6 files changed, 81 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files index d0897f5..f0767a0 100644 --- a/src/Makefile.files +++ b/src/Makefile.files @@ -229,4 +229,6 @@ SRC = analysis/analysis.cpp \ nodes/cst/void_cst.h \ parsers/cst/void_cst.cpp \ nodes/stmt/break_stmt.h \ - parsers/stmt/break_stmt.cpp
\ No newline at end of file + parsers/stmt/break_stmt.cpp \ + nodes/expr/compound_expr.h \ + parsers/expr/compound_expr.cpp
\ No newline at end of file diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h index 54e4298..d8c2d55 100644 --- a/src/includes/nodeincludes.h +++ b/src/includes/nodeincludes.h @@ -94,3 +94,4 @@ #include "nodes/expr/abs_expr.h" #include "nodes/cst/void_cst.h" #include "nodes/stmt/break_stmt.h" +#include "nodes/expr/compound_expr.h" diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc index 2b27be6..6eb589f 100644 --- a/src/includes/nodeshandling.inc +++ b/src/includes/nodeshandling.inc @@ -93,3 +93,4 @@ handleNodeType(UNION_TYPE, UnionType) handleNodeType(ABS_EXPR, AbsExpr) handleNodeType(VOID_CST, VoidCst) handleNodeType(BREAK_STMT, BreakStmt) +handleNodeType(COMPOUND_EXPR, CompoundExpr) diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc index 6fe0456..f7fcf69 100644 --- a/src/includes/parserdefines.inc +++ b/src/includes/parserdefines.inc @@ -93,3 +93,4 @@ parserDefine(UnionType); parserDefine(AbsExpr); parserDefine(VoidCst); parserDefine(BreakStmt); +parserDefine(CompoundExpr); diff --git a/src/nodes/expr/compound_expr.h b/src/nodes/expr/compound_expr.h new file mode 100644 index 0000000..b4859e9 --- /dev/null +++ b/src/nodes/expr/compound_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_COMPOUNDEXPRNODE_H +#define NODES_EXPR_COMPOUNDEXPRNODE_H + +#include "nodes/base/expr.h" + +#include <string> + +struct CompoundExprNode : public ExprNode +{ + CompoundExprNode() : + ExprNode() + { + } +}; + +#endif // NODES_EXPR_COMPOUNDEXPRNODE_H diff --git a/src/parsers/expr/compound_expr.cpp b/src/parsers/expr/compound_expr.cpp new file mode 100644 index 0000000..8693471 --- /dev/null +++ b/src/parsers/expr/compound_expr.cpp @@ -0,0 +1,40 @@ +/* + * 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(CompoundExpr); + +#include "parsers/base/expr.h" + +#include "nodes/expr/compound_expr.h" + +namespace Generic +{ + +void parseCompoundExprNode(CompoundExprNode *node) +{ + fillType(node); + fillExprLocation(node); + Log::dump(node); + + fillExprOperands(node); +} + +} |