summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-16 23:17:02 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-16 23:17:02 +0300
commitd4d1b73adc682457c6950d96113c7468107872b0 (patch)
treea10743a771e6e0567a87bf4027c815c98c3de0e3 /src
parent0c41fdd6dfad9a3b6e0988a4e99241c3ff7aca1f (diff)
downloadparanucker-d4d1b73adc682457c6950d96113c7468107872b0.tar.gz
paranucker-d4d1b73adc682457c6950d96113c7468107872b0.tar.bz2
paranucker-d4d1b73adc682457c6950d96113c7468107872b0.tar.xz
paranucker-d4d1b73adc682457c6950d96113c7468107872b0.zip
Add parsing node SCOPE_REF.
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/ref/scope_ref.h35
-rw-r--r--src/parsers/ref/scope_ref.cpp40
6 files changed, 81 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files
index f10c68f..8ec2b38 100644
--- a/src/Makefile.files
+++ b/src/Makefile.files
@@ -290,4 +290,6 @@ SRC = analysis/analysis.cpp \
nodes/expr/range_expr.h \
parsers/expr/range_expr.cpp \
nodes/expr/rrotate_expr.h \
- parsers/expr/rrotate_expr.cpp \ No newline at end of file
+ parsers/expr/rrotate_expr.cpp \
+ nodes/ref/scope_ref.h \
+ parsers/ref/scope_ref.cpp \ No newline at end of file
diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h
index 62a1130..494b41b 100644
--- a/src/includes/nodeincludes.h
+++ b/src/includes/nodeincludes.h
@@ -123,3 +123,4 @@
#include "nodes/cst/ptrmem_cst.h"
#include "nodes/expr/range_expr.h"
#include "nodes/expr/rrotate_expr.h"
+#include "nodes/ref/scope_ref.h"
diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc
index 4fc0d6c..0e77f12 100644
--- a/src/includes/nodeshandling.inc
+++ b/src/includes/nodeshandling.inc
@@ -122,3 +122,4 @@ handleNodeType(MAX_EXPR, MaxExpr)
handleNodeType(PTRMEM_CST, PtrMemCst)
handleNodeType(RANGE_EXPR, RangeExpr)
handleNodeType(RROTATE_EXPR, RRotateExpr)
+handleNodeType(SCOPE_REF, ScopeRef)
diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc
index c6091b6..498fc31 100644
--- a/src/includes/parserdefines.inc
+++ b/src/includes/parserdefines.inc
@@ -122,3 +122,4 @@ parserDefine(MaxExpr);
parserDefine(PtrMemCst);
parserDefine(RangeExpr);
parserDefine(RRotateExpr);
+parserDefine(ScopeRef);
diff --git a/src/nodes/ref/scope_ref.h b/src/nodes/ref/scope_ref.h
new file mode 100644
index 0000000..46403d1
--- /dev/null
+++ b/src/nodes/ref/scope_ref.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_REF_SCOPEREFNODE_H
+#define NODES_REF_SCOPEREFNODE_H
+
+#include "nodes/base/ref.h"
+
+#include <string>
+
+struct ScopeRefNode : public RefNode
+{
+ ScopeRefNode() :
+ RefNode()
+ {
+ }
+};
+
+#endif // NODES_REF_SCOPEREFNODE_H
diff --git a/src/parsers/ref/scope_ref.cpp b/src/parsers/ref/scope_ref.cpp
new file mode 100644
index 0000000..1dc98c1
--- /dev/null
+++ b/src/parsers/ref/scope_ref.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(ScopeRef);
+
+#include "parsers/base/ref.h"
+
+#include "nodes/ref/scope_ref.h"
+
+namespace Generic
+{
+
+void parseScopeRefNode(ScopeRefNode *node)
+{
+ fillType(node);
+ fillRefLocation(node);
+ Log::dump(node);
+
+ fillRefOperands(node);
+}
+
+}