Skip to content

Commit

Permalink
Re-generated the parser bindings and bootstrap code.
Browse files Browse the repository at this point in the history
  • Loading branch information
tritao committed Mar 11, 2019
1 parent e0875c7 commit 3ea7e97
Show file tree
Hide file tree
Showing 15 changed files with 13,357 additions and 16,183 deletions.
1 change: 0 additions & 1 deletion src/AST/Stmt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ public Stmt()
public SourceRange SourceRange { get; set; }
public SourceLocation BeginLoc { get; set; }
public SourceLocation EndLoc { get; set; }
public Stmt StripLabelLikeStatements { get; set; }

public abstract T Visit<T>(IStmtVisitor<T> visitor);
}
Expand Down
10 changes: 0 additions & 10 deletions src/CppParser/Bindings/CLI/Stmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,6 @@ void CppSharp::Parser::AST::Stmt::EndLoc::set(CppSharp::Parser::SourceLocation v
((::CppSharp::CppParser::AST::Stmt*)NativePtr)->endLoc = _marshal0;
}

CppSharp::Parser::AST::Stmt^ CppSharp::Parser::AST::Stmt::StripLabelLikeStatements::get()
{
return (((::CppSharp::CppParser::AST::Stmt*)NativePtr)->stripLabelLikeStatements == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)((::CppSharp::CppParser::AST::Stmt*)NativePtr)->stripLabelLikeStatements);
}

void CppSharp::Parser::AST::Stmt::StripLabelLikeStatements::set(CppSharp::Parser::AST::Stmt^ value)
{
((::CppSharp::CppParser::AST::Stmt*)NativePtr)->stripLabelLikeStatements = (::CppSharp::CppParser::AST::Stmt*)value->NativePtr;
}

CppSharp::Parser::AST::DeclStmt::DeclStmt(::CppSharp::CppParser::AST::DeclStmt* native)
: CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)native)
{
Expand Down
6 changes: 0 additions & 6 deletions src/CppParser/Bindings/CLI/Stmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,6 @@ namespace CppSharp
void set(CppSharp::Parser::SourceLocation);
}

property CppSharp::Parser::AST::Stmt^ StripLabelLikeStatements
{
CppSharp::Parser::AST::Stmt^ get();
void set(CppSharp::Parser::AST::Stmt^);
}

static operator CppSharp::Parser::AST::Stmt^(CppSharp::Parser::AST::StmtClass klass);

protected:
Expand Down
4,854 changes: 2,214 additions & 2,640 deletions src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs

Large diffs are not rendered by default.

4,846 changes: 2,210 additions & 2,636 deletions src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs

Large diffs are not rendered by default.

4,894 changes: 2,234 additions & 2,660 deletions src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs

Large diffs are not rendered by default.

4,892 changes: 2,233 additions & 2,659 deletions src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs

Large diffs are not rendered by default.

4,892 changes: 2,233 additions & 2,659 deletions src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs

Large diffs are not rendered by default.

4,892 changes: 2,233 additions & 2,659 deletions src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs

Large diffs are not rendered by default.

95 changes: 0 additions & 95 deletions src/CppParser/ParseExpr.cpp

Large diffs are not rendered by default.

30 changes: 0 additions & 30 deletions src/CppParser/ParseStmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::DeclStmt*>(llvm::cast<clang::DeclStmt>(Stmt));
auto _S = new AST::DeclStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->isSingleDecl = S->isSingleDecl();
if (S->isSingleDecl())
_S->singleDecl = static_cast<AST::Declaration*>(WalkDeclaration(S->getSingleDecl()));
Expand All @@ -42,7 +41,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::NullStmt*>(llvm::cast<clang::NullStmt>(Stmt));
auto _S = new AST::NullStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->hasLeadingEmptyMacro = S->hasLeadingEmptyMacro();
_Stmt = _S;
break;
Expand All @@ -51,7 +49,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::CompoundStmt*>(llvm::cast<clang::CompoundStmt>(Stmt));
auto _S = new AST::CompoundStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->body_empty = S->body_empty();
_S->size = S->size();
_S->body_front = static_cast<AST::Stmt*>(WalkStatement(S->body_front()));
Expand All @@ -68,7 +65,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::CaseStmt*>(llvm::cast<clang::CaseStmt>(Stmt));
auto _S = new AST::CaseStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->subStmt = static_cast<AST::Stmt*>(WalkStatement(S->getSubStmt()));
_S->lHS = static_cast<AST::Expr*>(WalkExpression(S->getLHS()));
_S->rHS = static_cast<AST::Expr*>(WalkExpression(S->getRHS()));
Expand All @@ -81,7 +77,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::DefaultStmt*>(llvm::cast<clang::DefaultStmt>(Stmt));
auto _S = new AST::DefaultStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->subStmt = static_cast<AST::Stmt*>(WalkStatement(S->getSubStmt()));
_S->subStmt = static_cast<AST::Stmt*>(WalkStatement(S->getSubStmt()));
_Stmt = _S;
Expand All @@ -91,7 +86,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::LabelStmt*>(llvm::cast<clang::LabelStmt>(Stmt));
auto _S = new AST::LabelStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->subStmt = static_cast<AST::Stmt*>(WalkStatement(S->getSubStmt()));
_S->name = S->getName();
_Stmt = _S;
Expand All @@ -101,7 +95,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::AttributedStmt*>(llvm::cast<clang::AttributedStmt>(Stmt));
auto _S = new AST::AttributedStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->subStmt = static_cast<AST::Stmt*>(WalkStatement(S->getSubStmt()));
_Stmt = _S;
break;
Expand All @@ -110,7 +103,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::IfStmt*>(llvm::cast<clang::IfStmt>(Stmt));
auto _S = new AST::IfStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond()));
_S->then = static_cast<AST::Stmt*>(WalkStatement(S->getThen()));
_S->_else = static_cast<AST::Stmt*>(WalkStatement(S->getElse()));
Expand All @@ -128,7 +120,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::SwitchStmt*>(llvm::cast<clang::SwitchStmt>(Stmt));
auto _S = new AST::SwitchStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond()));
_S->body = static_cast<AST::Stmt*>(WalkStatement(S->getBody()));
_S->init = static_cast<AST::Stmt*>(WalkStatement(S->getInit()));
Expand All @@ -143,7 +134,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::WhileStmt*>(llvm::cast<clang::WhileStmt>(Stmt));
auto _S = new AST::WhileStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond()));
_S->body = static_cast<AST::Stmt*>(WalkStatement(S->getBody()));
_S->hasVarStorage = S->hasVarStorage();
Expand All @@ -155,7 +145,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::DoStmt*>(llvm::cast<clang::DoStmt>(Stmt));
auto _S = new AST::DoStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond()));
_S->body = static_cast<AST::Stmt*>(WalkStatement(S->getBody()));
_Stmt = _S;
Expand All @@ -165,7 +154,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::ForStmt*>(llvm::cast<clang::ForStmt>(Stmt));
auto _S = new AST::ForStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->init = static_cast<AST::Stmt*>(WalkStatement(S->getInit()));
_S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond()));
_S->inc = static_cast<AST::Expr*>(WalkExpression(S->getInc()));
Expand All @@ -178,15 +166,13 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::GotoStmt*>(llvm::cast<clang::GotoStmt>(Stmt));
auto _S = new AST::GotoStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_Stmt = _S;
break;
}
case clang::Stmt::IndirectGotoStmtClass:
{
auto S = const_cast<clang::IndirectGotoStmt*>(llvm::cast<clang::IndirectGotoStmt>(Stmt));
auto _S = new AST::IndirectGotoStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->target = static_cast<AST::Expr*>(WalkExpression(S->getTarget()));
_Stmt = _S;
break;
Expand All @@ -195,23 +181,20 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::ContinueStmt*>(llvm::cast<clang::ContinueStmt>(Stmt));
auto _S = new AST::ContinueStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_Stmt = _S;
break;
}
case clang::Stmt::BreakStmtClass:
{
auto S = const_cast<clang::BreakStmt*>(llvm::cast<clang::BreakStmt>(Stmt));
auto _S = new AST::BreakStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_Stmt = _S;
break;
}
case clang::Stmt::ReturnStmtClass:
{
auto S = const_cast<clang::ReturnStmt*>(llvm::cast<clang::ReturnStmt>(Stmt));
auto _S = new AST::ReturnStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->retValue = static_cast<AST::Expr*>(WalkExpression(S->getRetValue()));
_Stmt = _S;
break;
Expand All @@ -220,7 +203,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::GCCAsmStmt*>(llvm::cast<clang::GCCAsmStmt>(Stmt));
auto _S = new AST::GCCAsmStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->simple = S->isSimple();
_S->_volatile = S->isVolatile();
_S->numOutputs = S->getNumOutputs();
Expand All @@ -244,7 +226,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::MSAsmStmt*>(llvm::cast<clang::MSAsmStmt>(Stmt));
auto _S = new AST::MSAsmStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->simple = S->isSimple();
_S->_volatile = S->isVolatile();
_S->numOutputs = S->getNumOutputs();
Expand All @@ -271,7 +252,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::SEHExceptStmt*>(llvm::cast<clang::SEHExceptStmt>(Stmt));
auto _S = new AST::SEHExceptStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->filterExpr = static_cast<AST::Expr*>(WalkExpression(S->getFilterExpr()));
_S->block = static_cast<AST::CompoundStmt*>(WalkStatement(S->getBlock()));
_Stmt = _S;
Expand All @@ -281,7 +261,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::SEHFinallyStmt*>(llvm::cast<clang::SEHFinallyStmt>(Stmt));
auto _S = new AST::SEHFinallyStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->block = static_cast<AST::CompoundStmt*>(WalkStatement(S->getBlock()));
_Stmt = _S;
break;
Expand All @@ -290,7 +269,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::SEHTryStmt*>(llvm::cast<clang::SEHTryStmt>(Stmt));
auto _S = new AST::SEHTryStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->isCXXTry = S->getIsCXXTry();
_S->tryBlock = static_cast<AST::CompoundStmt*>(WalkStatement(S->getTryBlock()));
_S->handler = static_cast<AST::Stmt*>(WalkStatement(S->getHandler()));
Expand All @@ -303,15 +281,13 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::SEHLeaveStmt*>(llvm::cast<clang::SEHLeaveStmt>(Stmt));
auto _S = new AST::SEHLeaveStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_Stmt = _S;
break;
}
case clang::Stmt::CapturedStmtClass:
{
auto S = const_cast<clang::CapturedStmt*>(llvm::cast<clang::CapturedStmt>(Stmt));
auto _S = new AST::CapturedStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->capturedStmt = static_cast<AST::Stmt*>(WalkStatement(S->getCapturedStmt()));
_S->capture_size = S->capture_size();
for (auto _E : S->capture_inits())
Expand All @@ -326,7 +302,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::CXXCatchStmt*>(llvm::cast<clang::CXXCatchStmt>(Stmt));
auto _S = new AST::CXXCatchStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->caughtType = GetQualifiedType(S->getCaughtType());
_S->handlerBlock = static_cast<AST::Stmt*>(WalkStatement(S->getHandlerBlock()));
_Stmt = _S;
Expand All @@ -336,7 +311,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::CXXTryStmt*>(llvm::cast<clang::CXXTryStmt>(Stmt));
auto _S = new AST::CXXTryStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->tryBlock = static_cast<AST::CompoundStmt*>(WalkStatement(S->getTryBlock()));
_S->numHandlers = S->getNumHandlers();
_Stmt = _S;
Expand All @@ -346,7 +320,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::CXXForRangeStmt*>(llvm::cast<clang::CXXForRangeStmt>(Stmt));
auto _S = new AST::CXXForRangeStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->init = static_cast<AST::Stmt*>(WalkStatement(S->getInit()));
_S->rangeInit = static_cast<AST::Expr*>(WalkExpression(S->getRangeInit()));
_S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond()));
Expand All @@ -363,7 +336,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::MSDependentExistsStmt*>(llvm::cast<clang::MSDependentExistsStmt>(Stmt));
auto _S = new AST::MSDependentExistsStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->isIfExists = S->isIfExists();
_S->isIfNotExists = S->isIfNotExists();
_S->subStmt = static_cast<AST::CompoundStmt*>(WalkStatement(S->getSubStmt()));
Expand All @@ -374,7 +346,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::CoroutineBodyStmt*>(llvm::cast<clang::CoroutineBodyStmt>(Stmt));
auto _S = new AST::CoroutineBodyStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->hasDependentPromiseType = S->hasDependentPromiseType();
_S->body = static_cast<AST::Stmt*>(WalkStatement(S->getBody()));
_S->promiseDeclStmt = static_cast<AST::Stmt*>(WalkStatement(S->getPromiseDeclStmt()));
Expand All @@ -395,7 +366,6 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{
auto S = const_cast<clang::CoreturnStmt*>(llvm::cast<clang::CoreturnStmt>(Stmt));
auto _S = new AST::CoreturnStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->isImplicit = S->isImplicit();
_S->operand = static_cast<AST::Expr*>(WalkExpression(S->getOperand()));
_S->promiseCall = static_cast<AST::Expr*>(WalkExpression(S->getPromiseCall()));
Expand Down
2 changes: 0 additions & 2 deletions src/CppParser/Stmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Stmt::Stmt()
, sourceRange(SourceRange())
, beginLoc(SourceLocation())
, endLoc(SourceLocation())
, stripLabelLikeStatements(nullptr)
{
}

Expand All @@ -25,7 +24,6 @@ Stmt::Stmt(StmtClass klass)
, sourceRange(SourceRange())
, beginLoc(SourceLocation())
, endLoc(SourceLocation())
, stripLabelLikeStatements(nullptr)
{
}

Expand Down
1 change: 0 additions & 1 deletion src/CppParser/Stmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ class CS_API Stmt
SourceRange sourceRange;
SourceLocation beginLoc;
SourceLocation endLoc;
Stmt* stripLabelLikeStatements;
};

class CS_API DeclStmt : public Stmt
Expand Down
Loading

0 comments on commit 3ea7e97

Please sign in to comment.