diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-13 23:26:42 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-13 23:26:42 +0300 |
commit | bf0ce2f8cf8370d27ebacc3edc52e4a6512d1758 (patch) | |
tree | 7ca491d6afcf3f35be28a0a44abfa9b5e5407d0b | |
parent | 9d1e3a54184b6f0e4d4979b8fe07a1873b37ca16 (diff) | |
download | paranucker-bf0ce2f8cf8370d27ebacc3edc52e4a6512d1758.tar.gz paranucker-bf0ce2f8cf8370d27ebacc3edc52e4a6512d1758.tar.bz2 paranucker-bf0ce2f8cf8370d27ebacc3edc52e4a6512d1758.tar.xz paranucker-bf0ce2f8cf8370d27ebacc3edc52e4a6512d1758.zip |
Add parsing node OBJ_TYPE_REF.
-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/ref/objtype_ref.h | 35 | ||||
-rw-r--r-- | src/parsers/ref/objtype_ref.cpp | 44 |
6 files changed, 85 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files index d249c77..9eb14ef 100644 --- a/src/Makefile.files +++ b/src/Makefile.files @@ -260,4 +260,6 @@ SRC = analysis/analysis.cpp \ nodes/expr/min_expr.h \ parsers/expr/min_expr.cpp \ nodes/expr/fixtrunc_expr.h \ - parsers/expr/fixtrunc_expr.cpp
\ No newline at end of file + parsers/expr/fixtrunc_expr.cpp \ + nodes/ref/objtype_ref.h \ + parsers/ref/objtype_ref.cpp
\ No newline at end of file diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h index 2841e9c..de4e343 100644 --- a/src/includes/nodeincludes.h +++ b/src/includes/nodeincludes.h @@ -108,3 +108,4 @@ #include "nodes/expr/emptyclass_expr.h" #include "nodes/expr/min_expr.h" #include "nodes/expr/fixtrunc_expr.h" +#include "nodes/ref/objtype_ref.h" diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc index 2c99e53..1e12c8e 100644 --- a/src/includes/nodeshandling.inc +++ b/src/includes/nodeshandling.inc @@ -107,3 +107,4 @@ handleNodeType(ENUMERAL_TYPE, EnumeralType) handleNodeType(EMPTY_CLASS_EXPR, EmptyClassExpr) handleNodeType(MIN_EXPR, MinExpr) handleNodeType(FIX_TRUNC_EXPR, FixTruncExpr) +handleNodeType(OBJ_TYPE_REF, ObjTypeRef) diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc index a5dd7d6..88d3a74 100644 --- a/src/includes/parserdefines.inc +++ b/src/includes/parserdefines.inc @@ -107,3 +107,4 @@ parserDefine(EnumeralType); parserDefine(EmptyClassExpr); parserDefine(MinExpr); parserDefine(FixTruncExpr); +parserDefine(ObjTypeRef); diff --git a/src/nodes/ref/objtype_ref.h b/src/nodes/ref/objtype_ref.h new file mode 100644 index 0000000..ab8abb9 --- /dev/null +++ b/src/nodes/ref/objtype_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_OBJTYPEREFNODE_H +#define NODES_REF_OBJTYPEREFNODE_H + +#include "nodes/base/ref.h" + +#include <string> + +struct ObjTypeRefNode : public RefNode +{ + ObjTypeRefNode() : + RefNode() + { + } +}; + +#endif // NODES_REF_OBJTYPEREFNODE_H diff --git a/src/parsers/ref/objtype_ref.cpp b/src/parsers/ref/objtype_ref.cpp new file mode 100644 index 0000000..8738014 --- /dev/null +++ b/src/parsers/ref/objtype_ref.cpp @@ -0,0 +1,44 @@ +/* + * 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(ObjTypeRef); + +#include "parsers/base/ref.h" + +#include "nodes/ref/objtype_ref.h" + +namespace Generic +{ + +void parseObjTypeRefNode(ObjTypeRefNode *node) +{ + fillType(node); + fillRefLocation(node); + Log::dump(node); + + fillRefOperands(node); + + // args 0 expr + // args 1 object + // args 2 token +} + +} |