summaryrefslogtreecommitdiff
path: root/src/parsers
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-16 21:29:57 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-16 21:29:57 +0300
commit8fa600f92e2d50ace451eae7e658f762e6bf7136 (patch)
treef2ead1b7a6d0c07626211d283ed04b234653b7b6 /src/parsers
parentaeba935c42c31e9f2cf557aaf69dda7cf91d7fdd (diff)
downloadparanucker-8fa600f92e2d50ace451eae7e658f762e6bf7136.tar.gz
paranucker-8fa600f92e2d50ace451eae7e658f762e6bf7136.tar.bz2
paranucker-8fa600f92e2d50ace451eae7e658f762e6bf7136.tar.xz
paranucker-8fa600f92e2d50ace451eae7e658f762e6bf7136.zip
Add parsing node CONTINUE_STMT.
Also add location reading for all statements.
Diffstat (limited to 'src/parsers')
-rw-r--r--src/parsers/stmt/break_stmt.cpp2
-rw-r--r--src/parsers/stmt/cleanup_stmt.cpp2
-rw-r--r--src/parsers/stmt/continue_stmt.cpp39
-rw-r--r--src/parsers/stmt/expr_stmt.cpp2
-rw-r--r--src/parsers/stmt/for_stmt.cpp2
-rw-r--r--src/parsers/stmt/if_stmt.cpp2
-rw-r--r--src/parsers/stmt/while_stmt.cpp2
7 files changed, 51 insertions, 0 deletions
diff --git a/src/parsers/stmt/break_stmt.cpp b/src/parsers/stmt/break_stmt.cpp
index 0055835..602cfb7 100644
--- a/src/parsers/stmt/break_stmt.cpp
+++ b/src/parsers/stmt/break_stmt.cpp
@@ -21,6 +21,7 @@
parserDefine(BreakStmt);
+#include "parsers/base/expr.h"
#include "parsers/base/stmt.h"
#include "nodes/stmt/break_stmt.h"
@@ -31,6 +32,7 @@ namespace Generic
void parseBreakStmtNode(BreakStmtNode *node)
{
fillType(node);
+ fillExprLocation(node);
Log::dump(node);
}
diff --git a/src/parsers/stmt/cleanup_stmt.cpp b/src/parsers/stmt/cleanup_stmt.cpp
index 026d934..06f9b4e 100644
--- a/src/parsers/stmt/cleanup_stmt.cpp
+++ b/src/parsers/stmt/cleanup_stmt.cpp
@@ -21,6 +21,7 @@
parserDefine(CleanupStmt);
+#include "parsers/base/expr.h"
#include "parsers/base/stmt.h"
#include "nodes/stmt/cleanup_stmt.h"
@@ -31,6 +32,7 @@ namespace Generic
void parseCleanupStmtNode(CleanupStmtNode *node)
{
fillType(node);
+ fillExprLocation(node);
Log::dump(node);
node->body = createParseNode(
diff --git a/src/parsers/stmt/continue_stmt.cpp b/src/parsers/stmt/continue_stmt.cpp
new file mode 100644
index 0000000..2dc54a7
--- /dev/null
+++ b/src/parsers/stmt/continue_stmt.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(ContinueStmt);
+
+#include "parsers/base/expr.h"
+#include "parsers/base/stmt.h"
+
+#include "nodes/stmt/continue_stmt.h"
+
+namespace Generic
+{
+
+void parseContinueStmtNode(ContinueStmtNode *node)
+{
+ fillType(node);
+ fillExprLocation(node);
+ Log::dump(node);
+}
+
+}
diff --git a/src/parsers/stmt/expr_stmt.cpp b/src/parsers/stmt/expr_stmt.cpp
index 3cadbff..a17a2dc 100644
--- a/src/parsers/stmt/expr_stmt.cpp
+++ b/src/parsers/stmt/expr_stmt.cpp
@@ -21,6 +21,7 @@
parserDefine(ExprStmt);
+#include "parsers/base/expr.h"
#include "parsers/base/stmt.h"
#include "nodes/base/expr.h"
@@ -33,6 +34,7 @@ namespace Generic
void parseExprStmtNode(ExprStmtNode *node)
{
fillType(node);
+ fillExprLocation(node);
Log::dump(node);
if (!node->parseChilds)
diff --git a/src/parsers/stmt/for_stmt.cpp b/src/parsers/stmt/for_stmt.cpp
index ba6e18b..d06be43 100644
--- a/src/parsers/stmt/for_stmt.cpp
+++ b/src/parsers/stmt/for_stmt.cpp
@@ -21,6 +21,7 @@
parserDefine(ForStmt);
+#include "parsers/base/expr.h"
#include "parsers/base/stmt.h"
#include "nodes/stmt/for_stmt.h"
@@ -31,6 +32,7 @@ namespace Generic
void parseForStmtNode(ForStmtNode *node)
{
fillType(node);
+ fillExprLocation(node);
Log::dump(node);
node->init = static_cast<StmtNode*>(createParseNode(
diff --git a/src/parsers/stmt/if_stmt.cpp b/src/parsers/stmt/if_stmt.cpp
index 9800f07..92eaff7 100644
--- a/src/parsers/stmt/if_stmt.cpp
+++ b/src/parsers/stmt/if_stmt.cpp
@@ -21,6 +21,7 @@
parserDefine(IfStmt);
+#include "parsers/base/expr.h"
#include "parsers/base/stmt.h"
#include "nodes/stmt/if_stmt.h"
@@ -31,6 +32,7 @@ namespace Generic
void parseIfStmtNode(IfStmtNode *node)
{
fillType(node);
+ fillExprLocation(node);
Log::dump(node);
if (!node->parseChilds)
diff --git a/src/parsers/stmt/while_stmt.cpp b/src/parsers/stmt/while_stmt.cpp
index 1c82aba..bb580f1 100644
--- a/src/parsers/stmt/while_stmt.cpp
+++ b/src/parsers/stmt/while_stmt.cpp
@@ -21,6 +21,7 @@
parserDefine(WhileStmt);
+#include "parsers/base/expr.h"
#include "parsers/base/stmt.h"
#include "nodes/stmt/while_stmt.h"
@@ -31,6 +32,7 @@ namespace Generic
void parseWhileStmtNode(WhileStmtNode *node)
{
fillType(node);
+ fillExprLocation(node);
Log::dump(node);
if (!node->parseChilds)