diff options
Diffstat (limited to 'src')
-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/modify_expr.h | 35 | ||||
-rw-r--r-- | src/parsers/expr/modify_expr.cpp | 39 |
6 files changed, 80 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files index 40c0ef6..3bdd0bd 100644 --- a/src/Makefile.files +++ b/src/Makefile.files @@ -76,4 +76,6 @@ SRC = nodes/base/cst.h \ nodes/expr/minus_expr.h \ parsers/expr/minus_expr.cpp \ nodes/expr/mult_expr.h \ - parsers/expr/mult_expr.cpp
\ No newline at end of file + parsers/expr/mult_expr.cpp \ + nodes/expr/modify_expr.h \ + parsers/expr/modify_expr.cpp
\ No newline at end of file diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h index e77985d..2c3c0c5 100644 --- a/src/includes/nodeincludes.h +++ b/src/includes/nodeincludes.h @@ -25,3 +25,4 @@ #include "nodes/expr/plus_expr.h" #include "nodes/expr/minus_expr.h" #include "nodes/expr/mult_expr.h" +#include "nodes/expr/modify_expr.h" diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc index 31d5f43..1b989d2 100644 --- a/src/includes/nodeshandling.inc +++ b/src/includes/nodeshandling.inc @@ -24,3 +24,4 @@ handleNodeType(WHILE_STMT, WhileStmt) handleNodeType(PLUS_EXPR, PlusExpr) handleNodeType(MINUS_EXPR, MinusExpr) handleNodeType(MULT_EXPR, MultExpr) +handleNodeType(MODIFY_EXPR, ModifyExpr) diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc index cde7cac..0060410 100644 --- a/src/includes/parserdefines.inc +++ b/src/includes/parserdefines.inc @@ -24,3 +24,4 @@ parserDefine(WhileStmt); parserDefine(PlusExpr); parserDefine(MinusExpr); parserDefine(MultExpr); +parserDefine(ModifyExpr); diff --git a/src/nodes/expr/modify_expr.h b/src/nodes/expr/modify_expr.h new file mode 100644 index 0000000..6f5f398 --- /dev/null +++ b/src/nodes/expr/modify_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_MODIFYEXPRNODE_H +#define NODES_EXPR_MODIFYEXPRNODE_H + +#include "nodes/base/expr.h" + +#include <string> + +struct ModifyExprNode : public ExprNode +{ + ModifyExprNode() : + ExprNode() + { + } +}; + +#endif // NODES_EXPR_MODIFYEXPRNODE_H diff --git a/src/parsers/expr/modify_expr.cpp b/src/parsers/expr/modify_expr.cpp new file mode 100644 index 0000000..b2270e8 --- /dev/null +++ b/src/parsers/expr/modify_expr.cpp @@ -0,0 +1,39 @@ +/* + * 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(ModifyExpr); + +#include "parsers/base/expr.h" + +#include "nodes/expr/modify_expr.h" + +namespace Generic +{ + +void parseModifyExprNode(ModifyExprNode *node) +{ + fillType(node); + Log::log(node); + + fillExprOperands(node); +} + +} |