diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-08 14:54:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-08 14:54:55 +0300 |
commit | d289a59daf069b3176f783d7beafbc7ea639a4ae (patch) | |
tree | de1561f506da1fb0c23a869b1b2f008536c9ea3e | |
parent | 390df1d32adc3a2a0111e4008f78f939f905ed64 (diff) | |
download | paranucker-d289a59daf069b3176f783d7beafbc7ea639a4ae.tar.gz paranucker-d289a59daf069b3176f783d7beafbc7ea639a4ae.tar.bz2 paranucker-d289a59daf069b3176f783d7beafbc7ea639a4ae.tar.xz paranucker-d289a59daf069b3176f783d7beafbc7ea639a4ae.zip |
Add parsing node LT_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/lt_expr.h | 35 | ||||
-rw-r--r-- | src/parsers/expr/lt_expr.cpp | 39 |
6 files changed, 80 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files index a3926ba..8f915fc 100644 --- a/src/Makefile.files +++ b/src/Makefile.files @@ -84,4 +84,6 @@ SRC = nodes/base/cst.h \ nodes/expr/addr_expr.h \ parsers/expr/addr_expr.cpp \ nodes/expr/eq_expr.h \ - parsers/expr/eq_expr.cpp
\ No newline at end of file + parsers/expr/eq_expr.cpp \ + nodes/expr/lt_expr.h \ + parsers/expr/lt_expr.cpp
\ No newline at end of file diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h index c11dacf..64969f2 100644 --- a/src/includes/nodeincludes.h +++ b/src/includes/nodeincludes.h @@ -29,3 +29,4 @@ #include "nodes/expr/call_expr.h" #include "nodes/expr/addr_expr.h" #include "nodes/expr/eq_expr.h" +#include "nodes/expr/lt_expr.h" diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc index 5e0a722..a8b86b1 100644 --- a/src/includes/nodeshandling.inc +++ b/src/includes/nodeshandling.inc @@ -28,3 +28,4 @@ handleNodeType(MODIFY_EXPR, ModifyExpr) handleNodeType(CALL_EXPR, CallExpr) handleNodeType(ADDR_EXPR, AddrExpr) handleNodeType(EQ_EXPR, EqExpr) +handleNodeType(LT_EXPR, LtExpr) diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc index af314ed..362588f 100644 --- a/src/includes/parserdefines.inc +++ b/src/includes/parserdefines.inc @@ -28,3 +28,4 @@ parserDefine(ModifyExpr); parserDefine(CallExpr); parserDefine(AddrExpr); parserDefine(EqExpr); +parserDefine(LtExpr); diff --git a/src/nodes/expr/lt_expr.h b/src/nodes/expr/lt_expr.h new file mode 100644 index 0000000..cd2c2d9 --- /dev/null +++ b/src/nodes/expr/lt_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_LTEXPRNODE_H +#define NODES_EXPR_LTEXPRNODE_H + +#include "nodes/base/expr.h" + +#include <string> + +struct LtExprNode : public ExprNode +{ + LtExprNode() : + ExprNode() + { + } +}; + +#endif // NODES_EXPR_LTEXPRNODE_H diff --git a/src/parsers/expr/lt_expr.cpp b/src/parsers/expr/lt_expr.cpp new file mode 100644 index 0000000..96b0a43 --- /dev/null +++ b/src/parsers/expr/lt_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(LtExpr); + +#include "parsers/base/expr.h" + +#include "nodes/expr/lt_expr.h" + +namespace Generic +{ + +void parseLtExprNode(LtExprNode *node) +{ + fillType(node); + Log::log(node); + + fillExprOperands(node); +} + +} |