summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-13 16:21:16 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-13 16:21:16 +0300
commit756085a352ce12873c9cb382bfd9df98ad61b66b (patch)
tree7b2a96694cd8253e3482f2bb03973e0b0e878bc0 /src
parent402bab925507475d89ff636ceebd35ce08b659cd (diff)
downloadparanucker-756085a352ce12873c9cb382bfd9df98ad61b66b.tar.gz
paranucker-756085a352ce12873c9cb382bfd9df98ad61b66b.tar.bz2
paranucker-756085a352ce12873c9cb382bfd9df98ad61b66b.tar.xz
paranucker-756085a352ce12873c9cb382bfd9df98ad61b66b.zip
Add parsing node ROUND_MOD_EXPR.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.files4
-rw-r--r--src/includes/nodeincludes.h1
-rw-r--r--src/includes/nodeshandling.inc1
-rw-r--r--src/includes/parserdefines.inc1
-rw-r--r--src/nodes/expr/roundmod_expr.h35
-rw-r--r--src/parsers/expr/roundmod_expr.cpp40
6 files changed, 81 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files
index 70c6c8f..75741e4 100644
--- a/src/Makefile.files
+++ b/src/Makefile.files
@@ -209,4 +209,6 @@ SRC = analysis/analysis.cpp \
nodes/expr/floormod_expr.h \
parsers/expr/floormod_expr.cpp \
nodes/expr/ceilmod_expr.h \
- parsers/expr/ceilmod_expr.cpp \ No newline at end of file
+ parsers/expr/ceilmod_expr.cpp \
+ nodes/expr/roundmod_expr.h \
+ parsers/expr/roundmod_expr.cpp \ No newline at end of file
diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h
index ccdc99e..4c5cbfc 100644
--- a/src/includes/nodeincludes.h
+++ b/src/includes/nodeincludes.h
@@ -84,3 +84,4 @@
#include "nodes/expr/truncmod_expr.h"
#include "nodes/expr/floormod_expr.h"
#include "nodes/expr/ceilmod_expr.h"
+#include "nodes/expr/roundmod_expr.h"
diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc
index 28d36ec..1ce0a96 100644
--- a/src/includes/nodeshandling.inc
+++ b/src/includes/nodeshandling.inc
@@ -83,3 +83,4 @@ handleNodeType(ROUND_DIV_EXPR, RoundDivExpr)
handleNodeType(TRUNC_MOD_EXPR, TruncModExpr)
handleNodeType(FLOOR_MOD_EXPR, FloorModExpr)
handleNodeType(CEIL_MOD_EXPR, CeilModExpr)
+handleNodeType(ROUND_MOD_EXPR, RoundModExpr)
diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc
index b9a8612..6efd9b9 100644
--- a/src/includes/parserdefines.inc
+++ b/src/includes/parserdefines.inc
@@ -83,3 +83,4 @@ parserDefine(RoundDivExpr);
parserDefine(TruncModExpr);
parserDefine(FloorModExpr);
parserDefine(CeilModExpr);
+parserDefine(RoundModExpr);
diff --git a/src/nodes/expr/roundmod_expr.h b/src/nodes/expr/roundmod_expr.h
new file mode 100644
index 0000000..eeb74ff
--- /dev/null
+++ b/src/nodes/expr/roundmod_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_ROUNDMODEXPRNODE_H
+#define NODES_EXPR_ROUNDMODEXPRNODE_H
+
+#include "nodes/base/expr.h"
+
+#include <string>
+
+struct RoundModExprNode : public ExprNode
+{
+ RoundModExprNode() :
+ ExprNode()
+ {
+ }
+};
+
+#endif // NODES_EXPR_ROUNDMODEXPRNODE_H
diff --git a/src/parsers/expr/roundmod_expr.cpp b/src/parsers/expr/roundmod_expr.cpp
new file mode 100644
index 0000000..fdbe946
--- /dev/null
+++ b/src/parsers/expr/roundmod_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(RoundModExpr);
+
+#include "parsers/base/expr.h"
+
+#include "nodes/expr/roundmod_expr.h"
+
+namespace Generic
+{
+
+void parseRoundModExprNode(RoundModExprNode *node)
+{
+ fillType(node);
+ fillExprLocation(node);
+ Log::dump(node);
+
+ fillExprOperands(node);
+}
+
+}