From 35ddc00e74c82d27ac6eaaceee2169fa252f215d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 8 Jun 2015 14:57:09 +0300 Subject: Add parsing node GE_EXPR. --- src/Makefile.files | 4 +++- src/includes/nodeincludes.h | 1 + src/includes/nodeshandling.inc | 1 + src/includes/parserdefines.inc | 1 + src/nodes/expr/ge_expr.h | 35 +++++++++++++++++++++++++++++++++++ src/parsers/expr/ge_expr.cpp | 39 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 src/nodes/expr/ge_expr.h create mode 100644 src/parsers/expr/ge_expr.cpp diff --git a/src/Makefile.files b/src/Makefile.files index 0a84b6a..df06c6a 100644 --- a/src/Makefile.files +++ b/src/Makefile.files @@ -90,4 +90,6 @@ SRC = nodes/base/cst.h \ nodes/expr/le_expr.h \ parsers/expr/le_expr.cpp \ nodes/expr/gt_expr.h \ - parsers/expr/gt_expr.cpp \ No newline at end of file + parsers/expr/gt_expr.cpp \ + nodes/expr/ge_expr.h \ + parsers/expr/ge_expr.cpp \ No newline at end of file diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h index 130f076..e98914c 100644 --- a/src/includes/nodeincludes.h +++ b/src/includes/nodeincludes.h @@ -32,3 +32,4 @@ #include "nodes/expr/lt_expr.h" #include "nodes/expr/le_expr.h" #include "nodes/expr/gt_expr.h" +#include "nodes/expr/ge_expr.h" diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc index 5056bfc..11ccbc9 100644 --- a/src/includes/nodeshandling.inc +++ b/src/includes/nodeshandling.inc @@ -31,3 +31,4 @@ handleNodeType(EQ_EXPR, EqExpr) handleNodeType(LT_EXPR, LtExpr) handleNodeType(LE_EXPR, LeExpr) handleNodeType(GT_EXPR, GtExpr) +handleNodeType(GE_EXPR, GeExpr) diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc index 1e7c8a8..1524bee 100644 --- a/src/includes/parserdefines.inc +++ b/src/includes/parserdefines.inc @@ -31,3 +31,4 @@ parserDefine(EqExpr); parserDefine(LtExpr); parserDefine(LeExpr); parserDefine(GtExpr); +parserDefine(GeExpr); diff --git a/src/nodes/expr/ge_expr.h b/src/nodes/expr/ge_expr.h new file mode 100644 index 0000000..764f093 --- /dev/null +++ b/src/nodes/expr/ge_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 . + */ + +#ifndef NODES_EXPR_GEEXPRNODE_H +#define NODES_EXPR_GEEXPRNODE_H + +#include "nodes/base/expr.h" + +#include + +struct GeExprNode : public ExprNode +{ + GeExprNode() : + ExprNode() + { + } +}; + +#endif // NODES_EXPR_GEEXPRNODE_H diff --git a/src/parsers/expr/ge_expr.cpp b/src/parsers/expr/ge_expr.cpp new file mode 100644 index 0000000..d0b82d7 --- /dev/null +++ b/src/parsers/expr/ge_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 . + */ + +#include "includes/parserincludes.h" + +parserDefine(GeExpr); + +#include "parsers/base/expr.h" + +#include "nodes/expr/ge_expr.h" + +namespace Generic +{ + +void parseGeExprNode(GeExprNode *node) +{ + fillType(node); + Log::log(node); + + fillExprOperands(node); +} + +} -- cgit v1.2.3-70-g09d2