diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-16 23:26:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-16 23:26:36 +0300 |
commit | 2e1208af3d2cf0f466c796aac5c139ced31bb9ca (patch) | |
tree | ecc03d804f026d9948e53c7b53911ef05870ed09 | |
parent | d4d1b73adc682457c6950d96113c7468107872b0 (diff) | |
download | paranucker-2e1208af3d2cf0f466c796aac5c139ced31bb9ca.tar.gz paranucker-2e1208af3d2cf0f466c796aac5c139ced31bb9ca.tar.bz2 paranucker-2e1208af3d2cf0f466c796aac5c139ced31bb9ca.tar.xz paranucker-2e1208af3d2cf0f466c796aac5c139ced31bb9ca.zip |
Add parsing node STATIC_CAST_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/staticcast_expr.h | 35 | ||||
-rw-r--r-- | src/parsers/expr/staticcast_expr.cpp | 40 |
6 files changed, 81 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files index 8ec2b38..c339c1e 100644 --- a/src/Makefile.files +++ b/src/Makefile.files @@ -292,4 +292,6 @@ SRC = analysis/analysis.cpp \ nodes/expr/rrotate_expr.h \ parsers/expr/rrotate_expr.cpp \ nodes/ref/scope_ref.h \ - parsers/ref/scope_ref.cpp
\ No newline at end of file + parsers/ref/scope_ref.cpp \ + nodes/expr/staticcast_expr.h \ + parsers/expr/staticcast_expr.cpp
\ No newline at end of file diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h index 494b41b..ab7d90b 100644 --- a/src/includes/nodeincludes.h +++ b/src/includes/nodeincludes.h @@ -124,3 +124,4 @@ #include "nodes/expr/range_expr.h" #include "nodes/expr/rrotate_expr.h" #include "nodes/ref/scope_ref.h" +#include "nodes/expr/staticcast_expr.h" diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc index 0e77f12..c6a03f9 100644 --- a/src/includes/nodeshandling.inc +++ b/src/includes/nodeshandling.inc @@ -123,3 +123,4 @@ handleNodeType(PTRMEM_CST, PtrMemCst) handleNodeType(RANGE_EXPR, RangeExpr) handleNodeType(RROTATE_EXPR, RRotateExpr) handleNodeType(SCOPE_REF, ScopeRef) +handleNodeType(STATIC_CAST_EXPR, StaticCastExpr) diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc index 498fc31..726bfdf 100644 --- a/src/includes/parserdefines.inc +++ b/src/includes/parserdefines.inc @@ -123,3 +123,4 @@ parserDefine(PtrMemCst); parserDefine(RangeExpr); parserDefine(RRotateExpr); parserDefine(ScopeRef); +parserDefine(StaticCastExpr); diff --git a/src/nodes/expr/staticcast_expr.h b/src/nodes/expr/staticcast_expr.h new file mode 100644 index 0000000..c8652a0 --- /dev/null +++ b/src/nodes/expr/staticcast_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_STATICCASTEXPRNODE_H +#define NODES_EXPR_STATICCASTEXPRNODE_H + +#include "nodes/base/expr.h" + +#include <string> + +struct StaticCastExprNode : public ExprNode +{ + StaticCastExprNode() : + ExprNode() + { + } +}; + +#endif // NODES_EXPR_STATICCASTEXPRNODE_H diff --git a/src/parsers/expr/staticcast_expr.cpp b/src/parsers/expr/staticcast_expr.cpp new file mode 100644 index 0000000..7291bf6 --- /dev/null +++ b/src/parsers/expr/staticcast_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(StaticCastExpr); + +#include "parsers/base/expr.h" + +#include "nodes/expr/staticcast_expr.h" + +namespace Generic +{ + +void parseStaticCastExprNode(StaticCastExprNode *node) +{ + fillType(node); + fillExprLocation(node); + Log::dump(node); + + fillExprOperands(node); +} + +} |