diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-13 16:07:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-13 16:07:11 +0300 |
commit | 7c72a5d7b580b7480be6cd2ab61b40a1d1a17033 (patch) | |
tree | cd158f2b59e708745377a70fef2fa5fe251c5a23 /src | |
parent | edbbaa958d4bcb8280482175562b787fe18d6276 (diff) | |
download | paranucker-7c72a5d7b580b7480be6cd2ab61b40a1d1a17033.tar.gz paranucker-7c72a5d7b580b7480be6cd2ab61b40a1d1a17033.tar.bz2 paranucker-7c72a5d7b580b7480be6cd2ab61b40a1d1a17033.tar.xz paranucker-7c72a5d7b580b7480be6cd2ab61b40a1d1a17033.zip |
Add parsing node CEIL_DIV_EXPR.
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/ceildiv_expr.h | 35 | ||||
-rw-r--r-- | src/parsers/expr/ceildiv_expr.cpp | 40 |
6 files changed, 81 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files index 18497c3..e24d02c 100644 --- a/src/Makefile.files +++ b/src/Makefile.files @@ -199,4 +199,6 @@ SRC = analysis/analysis.cpp \ nodes/expr/truncdiv_expr.h \ parsers/expr/truncdiv_expr.cpp \ nodes/expr/floordiv_expr.h \ - parsers/expr/floordiv_expr.cpp
\ No newline at end of file + parsers/expr/floordiv_expr.cpp \ + nodes/expr/ceildiv_expr.h \ + parsers/expr/ceildiv_expr.cpp
\ No newline at end of file diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h index 471dde5..16d39ed 100644 --- a/src/includes/nodeincludes.h +++ b/src/includes/nodeincludes.h @@ -79,3 +79,4 @@ #include "nodes/expr/postdecrement_expr.h" #include "nodes/expr/truncdiv_expr.h" #include "nodes/expr/floordiv_expr.h" +#include "nodes/expr/ceildiv_expr.h" diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc index 067f7b6..06c0488 100644 --- a/src/includes/nodeshandling.inc +++ b/src/includes/nodeshandling.inc @@ -78,3 +78,4 @@ handleNodeType(PREDECREMENT_EXPR, PreDecrementExpr) handleNodeType(POSTDECREMENT_EXPR, PostDecrementExpr) handleNodeType(TRUNC_DIV_EXPR, TruncDivExpr) handleNodeType(FLOOR_DIV_EXPR, FloorDivExpr) +handleNodeType(CEIL_DIV_EXPR, CeilDivExpr) diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc index 8d6fb98..b101a68 100644 --- a/src/includes/parserdefines.inc +++ b/src/includes/parserdefines.inc @@ -78,3 +78,4 @@ parserDefine(PreDecrementExpr); parserDefine(PostDecrementExpr); parserDefine(TruncDivExpr); parserDefine(FloorDivExpr); +parserDefine(CeilDivExpr); diff --git a/src/nodes/expr/ceildiv_expr.h b/src/nodes/expr/ceildiv_expr.h new file mode 100644 index 0000000..ca13516 --- /dev/null +++ b/src/nodes/expr/ceildiv_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_CEILDIVEXPRNODE_H +#define NODES_EXPR_CEILDIVEXPRNODE_H + +#include "nodes/base/expr.h" + +#include <string> + +struct CeilDivExprNode : public ExprNode +{ + CeilDivExprNode() : + ExprNode() + { + } +}; + +#endif // NODES_EXPR_CEILDIVEXPRNODE_H diff --git a/src/parsers/expr/ceildiv_expr.cpp b/src/parsers/expr/ceildiv_expr.cpp new file mode 100644 index 0000000..508b6f1 --- /dev/null +++ b/src/parsers/expr/ceildiv_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(CeilDivExpr); + +#include "parsers/base/expr.h" + +#include "nodes/expr/ceildiv_expr.h" + +namespace Generic +{ + +void parseCeilDivExprNode(CeilDivExprNode *node) +{ + fillType(node); + fillExprLocation(node); + Log::dump(node); + + fillExprOperands(node); +} + +} |