diff options
-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/expr/rshift_expr.h | 35 | ||||
-rw-r--r-- | src/parsers/expr/rshift_expr.cpp | 43 |
6 files changed, 84 insertions, 1 deletions
diff --git a/src/Makefile.files b/src/Makefile.files index e9cb708..b9af8e4 100644 --- a/src/Makefile.files +++ b/src/Makefile.files @@ -175,4 +175,6 @@ SRC = analysis/analysis.cpp \ nodes/stmt/cleanup_stmt.h \ parsers/stmt/cleanup_stmt.cpp \ nodes/expr/trycatch_expr.h \ - parsers/expr/trycatch_expr.cpp
\ No newline at end of file + parsers/expr/trycatch_expr.cpp \ + nodes/expr/rshift_expr.h \ + parsers/expr/rshift_expr.cpp
\ No newline at end of file diff --git a/src/includes/nodeincludes.h b/src/includes/nodeincludes.h index be04215..b63d8c8 100644 --- a/src/includes/nodeincludes.h +++ b/src/includes/nodeincludes.h @@ -67,3 +67,4 @@ #include "nodes/ref/component_ref.h" #include "nodes/stmt/cleanup_stmt.h" #include "nodes/expr/trycatch_expr.h" +#include "nodes/expr/rshift_expr.h" diff --git a/src/includes/nodeshandling.inc b/src/includes/nodeshandling.inc index a3862cd..2806797 100644 --- a/src/includes/nodeshandling.inc +++ b/src/includes/nodeshandling.inc @@ -66,3 +66,4 @@ handleNodeType(REFERENCE_TYPE, ReferenceType) handleNodeType(COMPONENT_REF, ComponentRef) handleNodeType(CLEANUP_STMT, CleanupStmt) handleNodeType(TRY_CATCH_EXPR, TryCatchExpr) +handleNodeType(RSHIFT_EXPR, RShiftExpr) diff --git a/src/includes/parserdefines.inc b/src/includes/parserdefines.inc index 53e0f81..9b80445 100644 --- a/src/includes/parserdefines.inc +++ b/src/includes/parserdefines.inc @@ -66,3 +66,4 @@ parserDefine(ReferenceType); parserDefine(ComponentRef); parserDefine(CleanupStmt); parserDefine(TryCatchExpr); +parserDefine(RShiftExpr); diff --git a/src/nodes/expr/rshift_expr.h b/src/nodes/expr/rshift_expr.h new file mode 100644 index 0000000..79a00cf --- /dev/null +++ b/src/nodes/expr/rshift_expr.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_EXPR_RSHIFTEXPRNODE_H +#define NODES_EXPR_RSHIFTEXPRNODE_H + +#include "nodes/base/expr.h" + +#include <string> + +struct RShiftExprNode : public ExprNode +{ + RShiftExprNode() : + ExprNode() + { + } +}; + +#endif // NODES_EXPR_RSHIFTEXPRNODE_H diff --git a/src/parsers/expr/rshift_expr.cpp b/src/parsers/expr/rshift_expr.cpp new file mode 100644 index 0000000..0cf91ef --- /dev/null +++ b/src/parsers/expr/rshift_expr.cpp @@ -0,0 +1,43 @@ +/* + * 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(RShiftExpr); + +#include "parsers/base/expr.h" + +#include "nodes/expr/rshift_expr.h" + +namespace Generic +{ + +void parseRShiftExprNode(RShiftExprNode *node) +{ + fillType(node); + fillExprLocation(node); + Log::dump(node); + + fillExprOperands(node); + + // args 0 value + // args 1 shift bits +} + +} |