diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-17 00:29:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-17 00:29:53 +0300 |
commit | 1c22be28854915b6b1e4172e4324a38d6afd4682 (patch) | |
tree | 2cef036f261c9b3e2f0a089f2392f22c33c0c42a | |
parent | 8d8ef94e9595488fa1b2fdfcce75ef7f74aa0dca (diff) | |
download | paranucker-1c22be28854915b6b1e4172e4324a38d6afd4682.tar.gz paranucker-1c22be28854915b6b1e4172e4324a38d6afd4682.tar.bz2 paranucker-1c22be28854915b6b1e4172e4324a38d6afd4682.tar.xz paranucker-1c22be28854915b6b1e4172e4324a38d6afd4682.zip |
Add parsing node TARGET_OPTION_NODE.
-rw-r--r-- | src/Makefile.files | 4 | ||||
-rw-r--r-- | src/includes/nodeincludes.h | 1 | ||||
-rw-r--r-- | src/includes/nodeshandling.inc | 1 | ||||
-rw-r--r-- | src/includes/parserdefines.inc | 1 | ||||
-rw-r--r-- | src/nodes/targetoption.h | 35 | ||||
-rw-r--r-- | src/parsers/targetoption.cpp | 38 |
6 files changed, 79 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files index 9c69a23..d2982cb 100644 --- a/src/Makefile.files +++ b/src/Makefile.files @@ -298,4 +298,6 @@ SRC = analysis/analysis.cpp \ nodes/expr/switch_expr.h \ parsers/expr/switch_expr.cpp \ nodes/stmt/switch_stmt.h \ - parsers/stmt/switch_stmt.cpp
\ No newline at end of file + parsers/stmt/switch_stmt.cpp \ + nodes/targetoption.h \ + parsers/targetoption.cpp
\ No newline at end of file diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h index 8ef6c56..52bedcb 100644 --- a/src/includes/nodeincludes.h +++ b/src/includes/nodeincludes.h @@ -127,3 +127,4 @@ #include "nodes/expr/staticcast_expr.h" #include "nodes/expr/switch_expr.h" #include "nodes/stmt/switch_stmt.h" +#include "nodes/targetoption.h" diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc index da960bc..0df5b2c 100644 --- a/src/includes/nodeshandling.inc +++ b/src/includes/nodeshandling.inc @@ -126,3 +126,4 @@ handleNodeType(SCOPE_REF, ScopeRef) handleNodeType(STATIC_CAST_EXPR, StaticCastExpr) handleNodeType(SWITCH_EXPR, SwitchExpr) handleNodeType(SWITCH_STMT, SwitchStmt) +handleNodeType(TARGET_OPTION_NODE, TargetOption) diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc index e9b98b4..646238e 100644 --- a/src/includes/parserdefines.inc +++ b/src/includes/parserdefines.inc @@ -126,3 +126,4 @@ parserDefine(ScopeRef); parserDefine(StaticCastExpr); parserDefine(SwitchExpr); parserDefine(SwitchStmt); +parserDefine(TargetOption); diff --git a/src/nodes/targetoption.h b/src/nodes/targetoption.h new file mode 100644 index 0000000..30b2d32 --- /dev/null +++ b/src/nodes/targetoption.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_TARGETOPTIONNODE_H +#define NODES_TARGETOPTIONNODE_H + +#include "nodes/base/node.h" + +#include <string> + +struct TargetOptionNode : public Node +{ + TargetOptionNode() : + Node() + { + } +}; + +#endif // NODES_TARGETOPTIONNODE_H diff --git a/src/parsers/targetoption.cpp b/src/parsers/targetoption.cpp new file mode 100644 index 0000000..ade2359 --- /dev/null +++ b/src/parsers/targetoption.cpp @@ -0,0 +1,38 @@ +/* + * 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(TargetOption); + + +#include "nodes/targetoption.h" + +namespace Generic +{ + +void parseTargetOptionNode(TargetOptionNode *node) +{ + fillType(node); + Log::dump(node); + + // TREE_TARGET_OPTION look like in internal format +} + +} |