Skip to content

Commit aa2175d

Browse files
moved CppTemplateArg from cppast to parser
1 parent f6f2ff8 commit aa2175d

File tree

4 files changed

+7
-26
lines changed

4 files changed

+7
-26
lines changed

cppast/include/cppast/cpp_entities.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include "cppast/cpp_preprocessor_unrecognized.h"
2626
#include "cppast/cpp_preprocessor_warning.h"
2727
#include "cppast/cpp_return_statement.h"
28-
#include "cppast/cpp_template_arg.h"
2928
#include "cppast/cpp_throw_statement.h"
3029
#include "cppast/cpp_try_block.h"
3130
#include "cppast/cpp_type_alias.h"

cppast/include/cppast/cpp_entity_ptr_defs.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ using CppReturnStatementEPtr = helper::CppEntityPtr<CppReturnStatement
6262
using CppStaticCastExprEPtr = helper::CppEntityPtr<CppStaticCastExpr>;
6363
using CppStringLiteralExprEPtr = helper::CppEntityPtr<CppStringLiteralExpr>;
6464
using CppSwitchBlockEPtr = helper::CppEntityPtr<CppSwitchBlock>;
65-
using CppTemplateArgEPtr = helper::CppEntityPtr<CppTemplateArg>;
6665
using CppThrowStatementEPtr = helper::CppEntityPtr<CppThrowStatement>;
6766
using CppTrinomialExprEPtr = helper::CppEntityPtr<CppTrinomialExpr>;
6867
using CppTryBlockEPtr = helper::CppEntityPtr<CppTryBlock>;
@@ -132,7 +131,6 @@ using CppConstReturnStatementEPtr = helper::CppEntityPtr<const CppRetu
132131
using CppConstStaticCastExprEPtr = helper::CppEntityPtr<const CppStaticCastExpr>;
133132
using CppConstStringLiteralExprEPtr = helper::CppEntityPtr<const CppStringLiteralExpr>;
134133
using CppConstSwitchBlockEPtr = helper::CppEntityPtr<const CppSwitchBlock>;
135-
using CppConstTemplateArgEPtr = helper::CppEntityPtr<const CppTemplateArg>;
136134
using CppConstThrowStatementEPtr = helper::CppEntityPtr<const CppThrowStatement>;
137135
using CppConstTrinomialExprEPtr = helper::CppEntityPtr<const CppTrinomialExpr>;
138136
using CppConstTryBlockEPtr = helper::CppEntityPtr<const CppTryBlock>;

cppast/include/cppast/cpp_template_arg.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

cppparser/src/parser.y

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ extern int yylex();
129129

130130
using namespace cppast;
131131

132+
// FIXME: Improve template arg parsing.
133+
// Template argument needs more robust support.
134+
// As of now we are treating them just as string.
135+
// But for parsing we need to have a type.
136+
class CppTemplateArg;
137+
132138
%}
133139

134140
%union {
@@ -170,7 +176,7 @@ using namespace cppast;
170176
bool inheritType;
171177
std::vector<std::string>* identifierList;
172178
std::vector<std::string>* funcThrowSpec;
173-
cppast::CppTemplateArg* templateArg;
179+
class CppTemplateArg* templateArg;
174180
cppast::CppAsmBlock* asmBlock;
175181
cppast::CppCompoundType compoundType;
176182
unsigned short ptrLevel;

0 commit comments

Comments
 (0)