diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-12 00:39:15 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-12 00:39:15 +0300 |
commit | 02ed297d531eabef1c381cfc8104d591621bc941 (patch) | |
tree | 6210a4d90b1e009202bbf49c66ecec305581a9fc /src | |
parent | e6916af5a3f6a7bee468aa4df3c102b2ad80d868 (diff) | |
download | paranucker-02ed297d531eabef1c381cfc8104d591621bc941.tar.gz paranucker-02ed297d531eabef1c381cfc8104d591621bc941.tar.bz2 paranucker-02ed297d531eabef1c381cfc8104d591621bc941.tar.xz paranucker-02ed297d531eabef1c381cfc8104d591621bc941.zip |
Add parsing node BOOLEAN_TYPE.
Diffstat (limited to 'src')
-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/type/boolean_type.h | 35 | ||||
-rw-r--r-- | src/parsers/type/boolean_type.cpp | 40 |
6 files changed, 81 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files index ff8330e..06221e2 100644 --- a/src/Makefile.files +++ b/src/Makefile.files @@ -115,4 +115,6 @@ SRC = analysis/analysis.cpp \ nodes/expr/cond_expr.h \ parsers/expr/cond_expr.cpp \ nodes/expr/pointerplus_expr.h \ - parsers/expr/pointerplus_expr.cpp
\ No newline at end of file + parsers/expr/pointerplus_expr.cpp \ + nodes/type/boolean_type.h \ + parsers/type/boolean_type.cpp
\ No newline at end of file diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h index 12ecde1..cff2090 100644 --- a/src/includes/nodeincludes.h +++ b/src/includes/nodeincludes.h @@ -39,3 +39,4 @@ #include "nodes/expr/nop_expr.h" #include "nodes/expr/cond_expr.h" #include "nodes/expr/pointerplus_expr.h" +#include "nodes/type/boolean_type.h" diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc index 2ee25d0..9c0e7f9 100644 --- a/src/includes/nodeshandling.inc +++ b/src/includes/nodeshandling.inc @@ -38,3 +38,4 @@ handleNodeType(LOOP_EXPR, LoopExpr) handleNodeType(NOP_EXPR, NopExpr) handleNodeType(COND_EXPR, CondExpr) handleNodeType(POINTER_PLUS_EXPR, PointerPlusExpr) +handleNodeType(BOOLEAN_TYPE, BooleanType) diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc index 48e74f9..83a23c9 100644 --- a/src/includes/parserdefines.inc +++ b/src/includes/parserdefines.inc @@ -38,3 +38,4 @@ parserDefine(LoopExpr); parserDefine(NopExpr); parserDefine(CondExpr); parserDefine(PointerPlusExpr); +parserDefine(BooleanType); diff --git a/src/nodes/type/boolean_type.h b/src/nodes/type/boolean_type.h new file mode 100644 index 0000000..25bbc5b --- /dev/null +++ b/src/nodes/type/boolean_type.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_TYPE_BOOLEANTYPENODE_H +#define NODES_TYPE_BOOLEANTYPENODE_H + +#include "nodes/base/type.h" + +#include <string> + +struct BooleanTypeNode : public TypeNode +{ + BooleanTypeNode() : + TypeNode() + { + } +}; + +#endif // NODES_TYPE_BOOLEANTYPENODE_H diff --git a/src/parsers/type/boolean_type.cpp b/src/parsers/type/boolean_type.cpp new file mode 100644 index 0000000..4a61de1 --- /dev/null +++ b/src/parsers/type/boolean_type.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(BooleanType); + +#include "parsers/base/type.h" + +#include "nodes/type/boolean_type.h" + +namespace Generic +{ + +void parseBooleanTypeNode(BooleanTypeNode *node) +{ + fillType(node); + Log::dump(node); + + fillTypeName(node); + fillTypeAttributes(node); +} + +} |