diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-12 20:51:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-12 20:52:27 +0300 |
commit | 38605f0b8508413c3263474db61c01c723f17567 (patch) | |
tree | 0aa50ecb404a59e38a3bbe96f28e699b1717a517 | |
parent | 5ba0ed87037a10818977c3cb12ac73225c6b4dc1 (diff) | |
download | paranucker-38605f0b8508413c3263474db61c01c723f17567.tar.gz paranucker-38605f0b8508413c3263474db61c01c723f17567.tar.bz2 paranucker-38605f0b8508413c3263474db61c01c723f17567.tar.xz paranucker-38605f0b8508413c3263474db61c01c723f17567.zip |
Add parsing node BIT_AND_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/bitand_expr.h | 35 | ||||
-rw-r--r-- | src/parsers/expr/bitand_expr.cpp | 40 |
6 files changed, 81 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files index a6374cc..af98435 100644 --- a/src/Makefile.files +++ b/src/Makefile.files @@ -152,4 +152,6 @@ SRC = analysis/analysis.cpp \ nodes/cst/real_cst.h \ parsers/cst/real_cst.cpp \ nodes/expr/rdiv_expr.h \ - parsers/expr/rdiv_expr.cpp
\ No newline at end of file + parsers/expr/rdiv_expr.cpp \ + nodes/expr/bitand_expr.h \ + parsers/expr/bitand_expr.cpp
\ No newline at end of file diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h index 860d532..1d22f82 100644 --- a/src/includes/nodeincludes.h +++ b/src/includes/nodeincludes.h @@ -57,3 +57,4 @@ #include "nodes/constructor.h" #include "nodes/cst/real_cst.h" #include "nodes/expr/rdiv_expr.h" +#include "nodes/expr/bitand_expr.h" diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc index cd72973..71d0a77 100644 --- a/src/includes/nodeshandling.inc +++ b/src/includes/nodeshandling.inc @@ -56,3 +56,4 @@ handleNodeType(REAL_TYPE, RealType) handleNodeType(CONSTRUCTOR, Constructor) handleNodeType(REAL_CST, RealCst) handleNodeType(RDIV_EXPR, RDivExpr) +handleNodeType(BIT_AND_EXPR, BitAndExpr) diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc index 8c02a39..275a788 100644 --- a/src/includes/parserdefines.inc +++ b/src/includes/parserdefines.inc @@ -56,3 +56,4 @@ parserDefine(RealType); parserDefine(Constructor); parserDefine(RealCst); parserDefine(RDivExpr); +parserDefine(BitAndExpr); diff --git a/src/nodes/expr/bitand_expr.h b/src/nodes/expr/bitand_expr.h new file mode 100644 index 0000000..b92db1a --- /dev/null +++ b/src/nodes/expr/bitand_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_BITANDEXPRNODE_H +#define NODES_EXPR_BITANDEXPRNODE_H + +#include "nodes/base/expr.h" + +#include <string> + +struct BitAndExprNode : public ExprNode +{ + BitAndExprNode() : + ExprNode() + { + } +}; + +#endif // NODES_EXPR_BITANDEXPRNODE_H diff --git a/src/parsers/expr/bitand_expr.cpp b/src/parsers/expr/bitand_expr.cpp new file mode 100644 index 0000000..ace2686 --- /dev/null +++ b/src/parsers/expr/bitand_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(BitAndExpr); + +#include "parsers/base/expr.h" + +#include "nodes/expr/bitand_expr.h" + +namespace Generic +{ + +void parseBitAndExprNode(BitAndExprNode *node) +{ + fillType(node); + fillExprLocation(node); + Log::dump(node); + + fillExprOperands(node); +} + +} |