summaryrefslogtreecommitdiff
path: root/src/nodes
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-04 23:57:45 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-04 23:57:45 +0300
commit2d95ee1669cb4b9b8bf60c4381ac7b8d9499fc53 (patch)
tree46d91428f135d55aaf6b78766a5149d52438f89f /src/nodes
parent4ca525cbb5e619f73a066a2e529daf6fd0ca07ce (diff)
downloadparanucker-2d95ee1669cb4b9b8bf60c4381ac7b8d9499fc53.tar.gz
paranucker-2d95ee1669cb4b9b8bf60c4381ac7b8d9499fc53.tar.bz2
paranucker-2d95ee1669cb4b9b8bf60c4381ac7b8d9499fc53.tar.xz
paranucker-2d95ee1669cb4b9b8bf60c4381ac7b8d9499fc53.zip
Add parsing INTEGER_CST node.
Also add function for convertng int to string.
Diffstat (limited to 'src/nodes')
-rw-r--r--src/nodes/base/cstnode.h33
-rw-r--r--src/nodes/integercstnode.h33
2 files changed, 66 insertions, 0 deletions
diff --git a/src/nodes/base/cstnode.h b/src/nodes/base/cstnode.h
new file mode 100644
index 0000000..e05981f
--- /dev/null
+++ b/src/nodes/base/cstnode.h
@@ -0,0 +1,33 @@
+/*
+ * 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_BASE_CSTNODE_H
+#define NODES_BASE_CSTNODE_H
+
+#include "nodes/base/node.h"
+
+struct CstNode : public Node
+{
+ CstNode() :
+ Node()
+ {
+ }
+};
+
+#endif // NODES_BASE_CSTNODE_H
diff --git a/src/nodes/integercstnode.h b/src/nodes/integercstnode.h
new file mode 100644
index 0000000..ca5d71c
--- /dev/null
+++ b/src/nodes/integercstnode.h
@@ -0,0 +1,33 @@
+/*
+ * 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_BASE_INTEGERCSTNODE_H
+#define NODES_BASE_INTEGERCSTNODE_H
+
+#include "nodes/base/cstnode.h"
+
+struct IntegerCstNode : public CstNode
+{
+ IntegerCstNode() :
+ CstNode()
+ {
+ }
+};
+
+#endif // NODES_BASE_INTEGERCSTNODE_H