diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-13 19:27:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-13 19:27:02 +0300 |
commit | 469c62758e704aa293cbe24d0781524268c5bc07 (patch) | |
tree | 56011b1e185702596487e8c5dda3728cf197a228 | |
parent | ebc04af9b4de6836fd3b718da8f54d9a036d291d (diff) | |
download | paranucker-469c62758e704aa293cbe24d0781524268c5bc07.tar.gz paranucker-469c62758e704aa293cbe24d0781524268c5bc07.tar.bz2 paranucker-469c62758e704aa293cbe24d0781524268c5bc07.tar.xz paranucker-469c62758e704aa293cbe24d0781524268c5bc07.zip |
Add parsing node USING_DECL.
-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/decl/using_decl.h | 35 | ||||
-rw-r--r-- | src/parsers/decl/using_decl.cpp | 42 |
6 files changed, 83 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files index cee98c8..297e96c 100644 --- a/src/Makefile.files +++ b/src/Makefile.files @@ -233,4 +233,6 @@ SRC = analysis/analysis.cpp \ nodes/expr/compound_expr.h \ parsers/expr/compound_expr.cpp \ nodes/decl/label_decl.h \ - parsers/decl/label_decl.cpp
\ No newline at end of file + parsers/decl/label_decl.cpp \ + nodes/decl/using_decl.h \ + parsers/decl/using_decl.cpp
\ No newline at end of file diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h index c539a82..3d566f2 100644 --- a/src/includes/nodeincludes.h +++ b/src/includes/nodeincludes.h @@ -96,3 +96,4 @@ #include "nodes/stmt/break_stmt.h" #include "nodes/expr/compound_expr.h" #include "nodes/decl/label_decl.h" +#include "nodes/decl/using_decl.h" diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc index 3797dcc..915cae8 100644 --- a/src/includes/nodeshandling.inc +++ b/src/includes/nodeshandling.inc @@ -95,3 +95,4 @@ handleNodeType(VOID_CST, VoidCst) handleNodeType(BREAK_STMT, BreakStmt) handleNodeType(COMPOUND_EXPR, CompoundExpr) handleNodeType(LABEL_DECL, LabelDecl) +handleNodeType(USING_DECL, UsingDecl) diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc index 6c5d106..c3c4762 100644 --- a/src/includes/parserdefines.inc +++ b/src/includes/parserdefines.inc @@ -95,3 +95,4 @@ parserDefine(VoidCst); parserDefine(BreakStmt); parserDefine(CompoundExpr); parserDefine(LabelDecl); +parserDefine(UsingDecl); diff --git a/src/nodes/decl/using_decl.h b/src/nodes/decl/using_decl.h new file mode 100644 index 0000000..f6d0ce9 --- /dev/null +++ b/src/nodes/decl/using_decl.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_DECL_USINGDECLNODE_H +#define NODES_DECL_USINGDECLNODE_H + +#include "nodes/base/decl.h" + +#include <string> + +struct UsingDeclNode : public DeclNode +{ + UsingDeclNode() : + DeclNode() + { + } +}; + +#endif // NODES_DECL_USINGDECLNODE_H diff --git a/src/parsers/decl/using_decl.cpp b/src/parsers/decl/using_decl.cpp new file mode 100644 index 0000000..040e029 --- /dev/null +++ b/src/parsers/decl/using_decl.cpp @@ -0,0 +1,42 @@ +/* + * 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(UsingDecl); + +#include "parsers/base/decl.h" + +#include "nodes/decl/using_decl.h" + +namespace Generic +{ + +void parseUsingDeclNode(UsingDeclNode *node) +{ + fillType(node); + fillLocation(node); + fillDeclLabel(node); + Log::dump(node); + + fillDeclAutoGenerated(node); + fillDeclAttributes(node); +} + +} |