Browse Source

Exposed many more properties of expressions.

They were previously hidden by a bug in the pass for properties fixed since.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1185/head
Dimitar Dobrev 6 years ago committed by João Matos
parent
commit
be0d9494fd
  1. 50
      src/AST/Expr.cs
  2. 17
      src/AST/Stmt.cs
  3. 513
      src/CppParser/Bindings/CLI/Expr.cpp
  4. 300
      src/CppParser/Bindings/CLI/Expr.h
  5. 170
      src/CppParser/Bindings/CLI/Stmt.cpp
  6. 102
      src/CppParser/Bindings/CLI/Stmt.h
  7. 6427
      src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs
  8. 6453
      src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs
  9. 6433
      src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs
  10. 6427
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs
  11. 6405
      src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs
  12. 6457
      src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs
  13. 14
      src/CppParser/Bootstrap/Bootstrap.cs
  14. 68
      src/CppParser/Expr.cpp
  15. 50
      src/CppParser/Expr.h
  16. 460
      src/CppParser/ParseExpr.cpp
  17. 46
      src/CppParser/ParseStmt.cpp
  18. 19
      src/CppParser/Stmt.cpp
  19. 17
      src/CppParser/Stmt.h
  20. 460
      src/Parser/ASTConverter.Expr.cs
  21. 45
      src/Parser/ASTConverter.Stmt.cs

50
src/AST/Expr.cs

@ -378,6 +378,9 @@ namespace CppSharp.AST
public bool IsXValue; public bool IsXValue;
public bool IsGLValue; public bool IsGLValue;
public bool IsOrdinaryOrBitFieldObject; public bool IsOrdinaryOrBitFieldObject;
public Field SourceBitField;
public Declaration ReferencedDeclOfCallee;
public bool HasPlaceholderType;
} }
public partial class FullExpr : Expr public partial class FullExpr : Expr
@ -417,6 +420,7 @@ namespace CppSharp.AST
public SourceLocation Location; public SourceLocation Location;
public bool HadMultipleCandidates; public bool HadMultipleCandidates;
public bool HasQualifier; public bool HasQualifier;
public Declaration FoundDecl;
public bool HasTemplateKWAndArgsInfo; public bool HasTemplateKWAndArgsInfo;
public SourceLocation TemplateKeywordLoc; public SourceLocation TemplateKeywordLoc;
public SourceLocation LAngleLoc; public SourceLocation LAngleLoc;
@ -566,6 +570,12 @@ namespace CppSharp.AST
public Expr SubExpr; public Expr SubExpr;
public SourceLocation OperatorLoc; public SourceLocation OperatorLoc;
public bool CanOverflow; public bool CanOverflow;
public bool IsPrefix;
public bool IsPostfix;
public bool IsIncrementOp;
public bool IsDecrementOp;
public bool IsIncrementDecrementOp;
public bool IsArithmeticOp;
} }
public partial class OffsetOfExpr : Expr public partial class OffsetOfExpr : Expr
@ -591,6 +601,7 @@ namespace CppSharp.AST
public SourceLocation RParenLoc; public SourceLocation RParenLoc;
public bool IsArgumentType; public bool IsArgumentType;
public QualifiedType ArgumentType; public QualifiedType ArgumentType;
public Expr ArgumentExpr;
public QualifiedType TypeOfArgument; public QualifiedType TypeOfArgument;
} }
@ -603,6 +614,8 @@ namespace CppSharp.AST
public Expr LHS; public Expr LHS;
public Expr RHS; public Expr RHS;
public SourceLocation RBracketLoc; public SourceLocation RBracketLoc;
public Expr Base;
public Expr Idx;
} }
public partial class CallExpr : Expr public partial class CallExpr : Expr
@ -614,6 +627,8 @@ namespace CppSharp.AST
public List<Expr> Arguments = new List<Expr>(); public List<Expr> Arguments = new List<Expr>();
public Expr Callee; public Expr Callee;
public SourceLocation RParenLoc; public SourceLocation RParenLoc;
public Declaration CalleeDecl;
public Function DirectCallee;
public uint NumArgs; public uint NumArgs;
public uint NumCommas; public uint NumCommas;
public uint BuiltinCallee; public uint BuiltinCallee;
@ -660,6 +675,8 @@ namespace CppSharp.AST
public CastKind CastKind; public CastKind CastKind;
public Expr SubExpr; public Expr SubExpr;
public string CastKindName;
public Expr SubExprAsWritten;
public Declaration ConversionFunction; public Declaration ConversionFunction;
public bool PathEmpty; public bool PathEmpty;
public uint PathSize; public uint PathSize;
@ -708,6 +725,19 @@ namespace CppSharp.AST
public BinaryOperatorKind Opcode; public BinaryOperatorKind Opcode;
public Expr LHS; public Expr LHS;
public Expr RHS; public Expr RHS;
public string OpcodeStr;
public bool IsPtrMemOp;
public bool IsMultiplicativeOp;
public bool IsAdditiveOp;
public bool IsShiftOp;
public bool IsBitwiseOp;
public bool IsRelationalOp;
public bool IsEqualityOp;
public bool IsComparisonOp;
public bool IsLogicalOp;
public bool IsAssignmentOp;
public bool IsCompoundAssignmentOp;
public bool IsShiftAssignOp;
public bool IsFPContractableWithinStatement; public bool IsFPContractableWithinStatement;
public bool IsFEnvAccessOn; public bool IsFEnvAccessOn;
} }
@ -967,8 +997,10 @@ namespace CppSharp.AST
public SourceLocation GenericLoc; public SourceLocation GenericLoc;
public SourceLocation DefaultLoc; public SourceLocation DefaultLoc;
public SourceLocation RParenLoc; public SourceLocation RParenLoc;
public Expr ControllingExpr;
public bool IsResultDependent; public bool IsResultDependent;
public uint ResultIndex; public uint ResultIndex;
public Expr ResultExpr;
} }
public partial class ExtVectorElementExpr : Expr public partial class ExtVectorElementExpr : Expr
@ -991,6 +1023,7 @@ namespace CppSharp.AST
} }
public SourceLocation CaretLocation; public SourceLocation CaretLocation;
public Stmt Body;
} }
public partial class AsTypeExpr : Expr public partial class AsTypeExpr : Expr
@ -1010,7 +1043,9 @@ namespace CppSharp.AST
{ {
} }
public Expr SyntacticForm;
public uint ResultExprIndex; public uint ResultExprIndex;
public Expr ResultExpr;
public uint NumSemanticExprs; public uint NumSemanticExprs;
} }
@ -1079,6 +1114,7 @@ namespace CppSharp.AST
public Expr Weak; public Expr Weak;
public QualifiedType ValueType; public QualifiedType ValueType;
public AtomicExpr.AtomicOp Op; public AtomicExpr.AtomicOp Op;
public uint NumSubExprs;
public bool IsVolatile; public bool IsVolatile;
public bool IsCmpXChg; public bool IsCmpXChg;
public bool IsOpenCL; public bool IsOpenCL;
@ -1101,6 +1137,7 @@ namespace CppSharp.AST
} }
public OverloadedOperatorKind Operator; public OverloadedOperatorKind Operator;
public bool IsAssignmentOp;
public bool IsInfixBinaryOp; public bool IsInfixBinaryOp;
public SourceLocation OperatorLoc; public SourceLocation OperatorLoc;
public bool IsFPContractableWithinStatement; public bool IsFPContractableWithinStatement;
@ -1193,6 +1230,7 @@ namespace CppSharp.AST
} }
public UserDefinedLiteral.LiteralOperatorKind literalOperatorKind; public UserDefinedLiteral.LiteralOperatorKind literalOperatorKind;
public Expr CookedLiteral;
public SourceLocation UDSuffixLoc; public SourceLocation UDSuffixLoc;
} }
@ -1221,6 +1259,7 @@ namespace CppSharp.AST
{ {
} }
public Expr SubExpr;
} }
public partial class CXXTypeidExpr : Expr public partial class CXXTypeidExpr : Expr
@ -1253,6 +1292,8 @@ namespace CppSharp.AST
} }
public SourceLocation RBracketLoc; public SourceLocation RBracketLoc;
public Expr Base;
public Expr Idx;
} }
public partial class CXXUuidofExpr : Expr public partial class CXXUuidofExpr : Expr
@ -1282,6 +1323,7 @@ namespace CppSharp.AST
{ {
} }
public Expr SubExpr;
public SourceLocation ThrowLoc; public SourceLocation ThrowLoc;
public bool IsThrownVariableInScope; public bool IsThrownVariableInScope;
} }
@ -1292,6 +1334,7 @@ namespace CppSharp.AST
{ {
} }
public Expr Expr;
public SourceLocation UsedLocation; public SourceLocation UsedLocation;
} }
@ -1301,6 +1344,8 @@ namespace CppSharp.AST
{ {
} }
public Field Field;
public Expr Expr;
} }
public partial class CXXBindTemporaryExpr : Expr public partial class CXXBindTemporaryExpr : Expr
@ -1415,12 +1460,14 @@ namespace CppSharp.AST
public Function OperatorDelete; public Function OperatorDelete;
public QualifiedType AllocatedType; public QualifiedType AllocatedType;
public bool IsArray; public bool IsArray;
public Expr ArraySize;
public uint NumPlacementArgs; public uint NumPlacementArgs;
public bool IsParenTypeId; public bool IsParenTypeId;
public SourceRange TypeIdParens; public SourceRange TypeIdParens;
public bool IsGlobalNew; public bool IsGlobalNew;
public bool HasInitializer; public bool HasInitializer;
public CXXNewExpr.InitializationStyle initializationStyle; public CXXNewExpr.InitializationStyle initializationStyle;
public Expr Initializer;
public CXXConstructExpr ConstructExpr; public CXXConstructExpr ConstructExpr;
public SourceRange DirectInitRange; public SourceRange DirectInitRange;
} }
@ -1435,6 +1482,7 @@ namespace CppSharp.AST
public bool IsArrayForm; public bool IsArrayForm;
public bool IsArrayFormAsWritten; public bool IsArrayFormAsWritten;
public Function OperatorDelete; public Function OperatorDelete;
public Expr Argument;
public QualifiedType DestroyedType; public QualifiedType DestroyedType;
} }
@ -1586,6 +1634,7 @@ namespace CppSharp.AST
} }
public bool IsImplicitAccess; public bool IsImplicitAccess;
public Expr Base;
public QualifiedType BaseType; public QualifiedType BaseType;
public bool HasUnresolvedUsing; public bool HasUnresolvedUsing;
public bool IsArrow; public bool IsArrow;
@ -1609,6 +1658,7 @@ namespace CppSharp.AST
{ {
} }
public Expr Pattern;
public SourceLocation EllipsisLoc; public SourceLocation EllipsisLoc;
} }

17
src/AST/Stmt.cs

@ -148,6 +148,7 @@ namespace CppSharp.AST
public SourceRange SourceRange; public SourceRange SourceRange;
public SourceLocation EndLoc; public SourceLocation EndLoc;
public Stmt StripLabelLikeStatements;
} }
public partial class DeclStmt : Stmt public partial class DeclStmt : Stmt
@ -158,6 +159,7 @@ namespace CppSharp.AST
public List<Declaration> Decls = new List<Declaration>(); public List<Declaration> Decls = new List<Declaration>();
public bool IsSingleDecl; public bool IsSingleDecl;
public Declaration SingleDecl;
} }
public partial class NullStmt : Stmt public partial class NullStmt : Stmt
@ -179,6 +181,8 @@ namespace CppSharp.AST
public List<Stmt> Body = new List<Stmt>(); public List<Stmt> Body = new List<Stmt>();
public bool BodyEmpty; public bool BodyEmpty;
public uint Size; public uint Size;
public Stmt BodyFront;
public Stmt BodyBack;
public SourceLocation LBracLoc; public SourceLocation LBracLoc;
public SourceLocation RBracLoc; public SourceLocation RBracLoc;
} }
@ -191,6 +195,7 @@ namespace CppSharp.AST
public SourceLocation KeywordLoc; public SourceLocation KeywordLoc;
public SourceLocation ColonLoc; public SourceLocation ColonLoc;
public Stmt SubStmt;
} }
public partial class CaseStmt : SwitchCase public partial class CaseStmt : SwitchCase
@ -203,7 +208,6 @@ namespace CppSharp.AST
public SourceLocation EllipsisLoc; public SourceLocation EllipsisLoc;
public Expr LHS; public Expr LHS;
public Expr RHS; public Expr RHS;
public Stmt SubStmt;
public bool CaseStmtIsGNURange; public bool CaseStmtIsGNURange;
} }
@ -213,7 +217,6 @@ namespace CppSharp.AST
{ {
} }
public Stmt SubStmt;
public SourceLocation DefaultLoc; public SourceLocation DefaultLoc;
} }
@ -235,6 +238,7 @@ namespace CppSharp.AST
} }
public SourceLocation AttrLoc; public SourceLocation AttrLoc;
public Stmt SubStmt;
} }
public partial class IfStmt : Stmt public partial class IfStmt : Stmt
@ -253,6 +257,7 @@ namespace CppSharp.AST
public bool HasInitStorage; public bool HasInitStorage;
public bool HasVarStorage; public bool HasVarStorage;
public bool HasElseStorage; public bool HasElseStorage;
public DeclStmt ConditionVariableDeclStmt;
public bool IsObjCAvailabilityCheck; public bool IsObjCAvailabilityCheck;
} }
@ -268,6 +273,7 @@ namespace CppSharp.AST
public SourceLocation SwitchLoc; public SourceLocation SwitchLoc;
public bool HasInitStorage; public bool HasInitStorage;
public bool HasVarStorage; public bool HasVarStorage;
public DeclStmt ConditionVariableDeclStmt;
public bool IsAllEnumCasesCovered; public bool IsAllEnumCasesCovered;
} }
@ -281,6 +287,7 @@ namespace CppSharp.AST
public Stmt Body; public Stmt Body;
public SourceLocation WhileLoc; public SourceLocation WhileLoc;
public bool HasVarStorage; public bool HasVarStorage;
public DeclStmt ConditionVariableDeclStmt;
} }
public partial class DoStmt : Stmt public partial class DoStmt : Stmt
@ -491,6 +498,7 @@ namespace CppSharp.AST
} }
public List<Expr> CaptureInits = new List<Expr>(); public List<Expr> CaptureInits = new List<Expr>();
public Stmt capturedStmt;
public uint CaptureSize; public uint CaptureSize;
} }
@ -512,6 +520,7 @@ namespace CppSharp.AST
} }
public SourceLocation TryLoc; public SourceLocation TryLoc;
public CompoundStmt TryBlock;
public uint NumHandlers; public uint NumHandlers;
} }
@ -526,6 +535,10 @@ namespace CppSharp.AST
public Expr Cond; public Expr Cond;
public Expr Inc; public Expr Inc;
public Stmt Body; public Stmt Body;
public DeclStmt RangeStmt;
public DeclStmt BeginStmt;
public DeclStmt EndStmt;
public DeclStmt LoopVarStmt;
public SourceLocation ForLoc; public SourceLocation ForLoc;
public SourceLocation CoawaitLoc; public SourceLocation CoawaitLoc;
public SourceLocation ColonLoc; public SourceLocation ColonLoc;

513
src/CppParser/Bindings/CLI/Expr.cpp

@ -293,6 +293,36 @@ void CppSharp::Parser::AST::Expr::IsOrdinaryOrBitFieldObject::set(bool value)
((::CppSharp::CppParser::AST::Expr*)NativePtr)->isOrdinaryOrBitFieldObject = value; ((::CppSharp::CppParser::AST::Expr*)NativePtr)->isOrdinaryOrBitFieldObject = value;
} }
CppSharp::Parser::AST::Field^ CppSharp::Parser::AST::Expr::SourceBitField::get()
{
return (((::CppSharp::CppParser::AST::Expr*)NativePtr)->sourceBitField == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Field((::CppSharp::CppParser::AST::Field*)((::CppSharp::CppParser::AST::Expr*)NativePtr)->sourceBitField);
}
void CppSharp::Parser::AST::Expr::SourceBitField::set(CppSharp::Parser::AST::Field^ value)
{
((::CppSharp::CppParser::AST::Expr*)NativePtr)->sourceBitField = (::CppSharp::CppParser::AST::Field*)value->NativePtr;
}
CppSharp::Parser::AST::Declaration^ CppSharp::Parser::AST::Expr::ReferencedDeclOfCallee::get()
{
return (((::CppSharp::CppParser::AST::Expr*)NativePtr)->referencedDeclOfCallee == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)((::CppSharp::CppParser::AST::Expr*)NativePtr)->referencedDeclOfCallee);
}
void CppSharp::Parser::AST::Expr::ReferencedDeclOfCallee::set(CppSharp::Parser::AST::Declaration^ value)
{
((::CppSharp::CppParser::AST::Expr*)NativePtr)->referencedDeclOfCallee = (::CppSharp::CppParser::AST::Declaration*)value->NativePtr;
}
bool CppSharp::Parser::AST::Expr::HasPlaceholderType::get()
{
return ((::CppSharp::CppParser::AST::Expr*)NativePtr)->hasPlaceholderType;
}
void CppSharp::Parser::AST::Expr::HasPlaceholderType::set(bool value)
{
((::CppSharp::CppParser::AST::Expr*)NativePtr)->hasPlaceholderType = value;
}
CppSharp::Parser::AST::FullExpr::FullExpr(::CppSharp::CppParser::AST::FullExpr* native) CppSharp::Parser::AST::FullExpr::FullExpr(::CppSharp::CppParser::AST::FullExpr* native)
: CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native) : CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native)
{ {
@ -507,6 +537,16 @@ void CppSharp::Parser::AST::DeclRefExpr::HasQualifier::set(bool value)
((::CppSharp::CppParser::AST::DeclRefExpr*)NativePtr)->hasQualifier = value; ((::CppSharp::CppParser::AST::DeclRefExpr*)NativePtr)->hasQualifier = value;
} }
CppSharp::Parser::AST::Declaration^ CppSharp::Parser::AST::DeclRefExpr::FoundDecl::get()
{
return (((::CppSharp::CppParser::AST::DeclRefExpr*)NativePtr)->foundDecl == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)((::CppSharp::CppParser::AST::DeclRefExpr*)NativePtr)->foundDecl);
}
void CppSharp::Parser::AST::DeclRefExpr::FoundDecl::set(CppSharp::Parser::AST::Declaration^ value)
{
((::CppSharp::CppParser::AST::DeclRefExpr*)NativePtr)->foundDecl = (::CppSharp::CppParser::AST::Declaration*)value->NativePtr;
}
bool CppSharp::Parser::AST::DeclRefExpr::HasTemplateKWAndArgsInfo::get() bool CppSharp::Parser::AST::DeclRefExpr::HasTemplateKWAndArgsInfo::get()
{ {
return ((::CppSharp::CppParser::AST::DeclRefExpr*)NativePtr)->hasTemplateKWAndArgsInfo; return ((::CppSharp::CppParser::AST::DeclRefExpr*)NativePtr)->hasTemplateKWAndArgsInfo;
@ -1244,6 +1284,66 @@ void CppSharp::Parser::AST::UnaryOperator::CanOverflow::set(bool value)
((::CppSharp::CppParser::AST::UnaryOperator*)NativePtr)->canOverflow = value; ((::CppSharp::CppParser::AST::UnaryOperator*)NativePtr)->canOverflow = value;
} }
bool CppSharp::Parser::AST::UnaryOperator::IsPrefix::get()
{
return ((::CppSharp::CppParser::AST::UnaryOperator*)NativePtr)->isPrefix;
}
void CppSharp::Parser::AST::UnaryOperator::IsPrefix::set(bool value)
{
((::CppSharp::CppParser::AST::UnaryOperator*)NativePtr)->isPrefix = value;
}
bool CppSharp::Parser::AST::UnaryOperator::IsPostfix::get()
{
return ((::CppSharp::CppParser::AST::UnaryOperator*)NativePtr)->isPostfix;
}
void CppSharp::Parser::AST::UnaryOperator::IsPostfix::set(bool value)
{
((::CppSharp::CppParser::AST::UnaryOperator*)NativePtr)->isPostfix = value;
}
bool CppSharp::Parser::AST::UnaryOperator::IsIncrementOp::get()
{
return ((::CppSharp::CppParser::AST::UnaryOperator*)NativePtr)->isIncrementOp;
}
void CppSharp::Parser::AST::UnaryOperator::IsIncrementOp::set(bool value)
{
((::CppSharp::CppParser::AST::UnaryOperator*)NativePtr)->isIncrementOp = value;
}
bool CppSharp::Parser::AST::UnaryOperator::IsDecrementOp::get()
{
return ((::CppSharp::CppParser::AST::UnaryOperator*)NativePtr)->isDecrementOp;
}
void CppSharp::Parser::AST::UnaryOperator::IsDecrementOp::set(bool value)
{
((::CppSharp::CppParser::AST::UnaryOperator*)NativePtr)->isDecrementOp = value;
}
bool CppSharp::Parser::AST::UnaryOperator::IsIncrementDecrementOp::get()
{
return ((::CppSharp::CppParser::AST::UnaryOperator*)NativePtr)->isIncrementDecrementOp;
}
void CppSharp::Parser::AST::UnaryOperator::IsIncrementDecrementOp::set(bool value)
{
((::CppSharp::CppParser::AST::UnaryOperator*)NativePtr)->isIncrementDecrementOp = value;
}
bool CppSharp::Parser::AST::UnaryOperator::IsArithmeticOp::get()
{
return ((::CppSharp::CppParser::AST::UnaryOperator*)NativePtr)->isArithmeticOp;
}
void CppSharp::Parser::AST::UnaryOperator::IsArithmeticOp::set(bool value)
{
((::CppSharp::CppParser::AST::UnaryOperator*)NativePtr)->isArithmeticOp = value;
}
CppSharp::Parser::AST::OffsetOfExpr::OffsetOfExpr(::CppSharp::CppParser::AST::OffsetOfExpr* native) CppSharp::Parser::AST::OffsetOfExpr::OffsetOfExpr(::CppSharp::CppParser::AST::OffsetOfExpr* native)
: CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native) : CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native)
{ {
@ -1404,6 +1504,16 @@ void CppSharp::Parser::AST::UnaryExprOrTypeTraitExpr::ArgumentType::set(CppSharp
((::CppSharp::CppParser::AST::UnaryExprOrTypeTraitExpr*)NativePtr)->argumentType = *(::CppSharp::CppParser::AST::QualifiedType*)value->NativePtr; ((::CppSharp::CppParser::AST::UnaryExprOrTypeTraitExpr*)NativePtr)->argumentType = *(::CppSharp::CppParser::AST::QualifiedType*)value->NativePtr;
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::UnaryExprOrTypeTraitExpr::ArgumentExpr::get()
{
return (((::CppSharp::CppParser::AST::UnaryExprOrTypeTraitExpr*)NativePtr)->argumentExpr == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::UnaryExprOrTypeTraitExpr*)NativePtr)->argumentExpr);
}
void CppSharp::Parser::AST::UnaryExprOrTypeTraitExpr::ArgumentExpr::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::UnaryExprOrTypeTraitExpr*)NativePtr)->argumentExpr = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::AST::QualifiedType^ CppSharp::Parser::AST::UnaryExprOrTypeTraitExpr::TypeOfArgument::get() CppSharp::Parser::AST::QualifiedType^ CppSharp::Parser::AST::UnaryExprOrTypeTraitExpr::TypeOfArgument::get()
{ {
return (&((::CppSharp::CppParser::AST::UnaryExprOrTypeTraitExpr*)NativePtr)->typeOfArgument == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::QualifiedType((::CppSharp::CppParser::AST::QualifiedType*)&((::CppSharp::CppParser::AST::UnaryExprOrTypeTraitExpr*)NativePtr)->typeOfArgument); return (&((::CppSharp::CppParser::AST::UnaryExprOrTypeTraitExpr*)NativePtr)->typeOfArgument == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::QualifiedType((::CppSharp::CppParser::AST::QualifiedType*)&((::CppSharp::CppParser::AST::UnaryExprOrTypeTraitExpr*)NativePtr)->typeOfArgument);
@ -1477,6 +1587,26 @@ void CppSharp::Parser::AST::ArraySubscriptExpr::RBracketLoc::set(CppSharp::Parse
((::CppSharp::CppParser::AST::ArraySubscriptExpr*)NativePtr)->rBracketLoc = _marshal0; ((::CppSharp::CppParser::AST::ArraySubscriptExpr*)NativePtr)->rBracketLoc = _marshal0;
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::ArraySubscriptExpr::Base::get()
{
return (((::CppSharp::CppParser::AST::ArraySubscriptExpr*)NativePtr)->base == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::ArraySubscriptExpr*)NativePtr)->base);
}
void CppSharp::Parser::AST::ArraySubscriptExpr::Base::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::ArraySubscriptExpr*)NativePtr)->base = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::ArraySubscriptExpr::Idx::get()
{
return (((::CppSharp::CppParser::AST::ArraySubscriptExpr*)NativePtr)->idx == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::ArraySubscriptExpr*)NativePtr)->idx);
}
void CppSharp::Parser::AST::ArraySubscriptExpr::Idx::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::ArraySubscriptExpr*)NativePtr)->idx = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::AST::CallExpr::CallExpr(::CppSharp::CppParser::AST::CallExpr* native) CppSharp::Parser::AST::CallExpr::CallExpr(::CppSharp::CppParser::AST::CallExpr* native)
: CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native) : CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native)
{ {
@ -1594,6 +1724,26 @@ void CppSharp::Parser::AST::CallExpr::RParenLoc::set(CppSharp::Parser::SourceLoc
((::CppSharp::CppParser::AST::CallExpr*)NativePtr)->rParenLoc = _marshal0; ((::CppSharp::CppParser::AST::CallExpr*)NativePtr)->rParenLoc = _marshal0;
} }
CppSharp::Parser::AST::Declaration^ CppSharp::Parser::AST::CallExpr::CalleeDecl::get()
{
return (((::CppSharp::CppParser::AST::CallExpr*)NativePtr)->calleeDecl == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)((::CppSharp::CppParser::AST::CallExpr*)NativePtr)->calleeDecl);
}
void CppSharp::Parser::AST::CallExpr::CalleeDecl::set(CppSharp::Parser::AST::Declaration^ value)
{
((::CppSharp::CppParser::AST::CallExpr*)NativePtr)->calleeDecl = (::CppSharp::CppParser::AST::Declaration*)value->NativePtr;
}
CppSharp::Parser::AST::Function^ CppSharp::Parser::AST::CallExpr::DirectCallee::get()
{
return (((::CppSharp::CppParser::AST::CallExpr*)NativePtr)->directCallee == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Function((::CppSharp::CppParser::AST::Function*)((::CppSharp::CppParser::AST::CallExpr*)NativePtr)->directCallee);
}
void CppSharp::Parser::AST::CallExpr::DirectCallee::set(CppSharp::Parser::AST::Function^ value)
{
((::CppSharp::CppParser::AST::CallExpr*)NativePtr)->directCallee = (::CppSharp::CppParser::AST::Function*)value->NativePtr;
}
unsigned int CppSharp::Parser::AST::CallExpr::NumArgs::get() unsigned int CppSharp::Parser::AST::CallExpr::NumArgs::get()
{ {
return ((::CppSharp::CppParser::AST::CallExpr*)NativePtr)->numArgs; return ((::CppSharp::CppParser::AST::CallExpr*)NativePtr)->numArgs;
@ -1941,6 +2091,27 @@ void CppSharp::Parser::AST::CastExpr::SubExpr::set(CppSharp::Parser::AST::Expr^
((::CppSharp::CppParser::AST::CastExpr*)NativePtr)->subExpr = (::CppSharp::CppParser::AST::Expr*)value->NativePtr; ((::CppSharp::CppParser::AST::CastExpr*)NativePtr)->subExpr = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
} }
System::String^ CppSharp::Parser::AST::CastExpr::CastKindName::get()
{
return (((::CppSharp::CppParser::AST::CastExpr*)NativePtr)->castKindName == 0 ? nullptr : clix::marshalString<clix::E_UTF8>(((::CppSharp::CppParser::AST::CastExpr*)NativePtr)->castKindName));
}
void CppSharp::Parser::AST::CastExpr::CastKindName::set(System::String^ value)
{
auto _value = clix::marshalString<clix::E_UTF8>(value);
((::CppSharp::CppParser::AST::CastExpr*)NativePtr)->castKindName = _value.c_str();
}
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::CastExpr::SubExprAsWritten::get()
{
return (((::CppSharp::CppParser::AST::CastExpr*)NativePtr)->subExprAsWritten == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::CastExpr*)NativePtr)->subExprAsWritten);
}
void CppSharp::Parser::AST::CastExpr::SubExprAsWritten::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::CastExpr*)NativePtr)->subExprAsWritten = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::AST::Declaration^ CppSharp::Parser::AST::CastExpr::ConversionFunction::get() CppSharp::Parser::AST::Declaration^ CppSharp::Parser::AST::CastExpr::ConversionFunction::get()
{ {
return (((::CppSharp::CppParser::AST::CastExpr*)NativePtr)->conversionFunction == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)((::CppSharp::CppParser::AST::CastExpr*)NativePtr)->conversionFunction); return (((::CppSharp::CppParser::AST::CastExpr*)NativePtr)->conversionFunction == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)((::CppSharp::CppParser::AST::CastExpr*)NativePtr)->conversionFunction);
@ -2136,6 +2307,12 @@ CppSharp::Parser::AST::BinaryOperator^ CppSharp::Parser::AST::BinaryOperator::__
CppSharp::Parser::AST::BinaryOperator::~BinaryOperator() CppSharp::Parser::AST::BinaryOperator::~BinaryOperator()
{ {
if (NativePtr)
{
auto __nativePtr = NativePtr;
NativePtr = 0;
delete (::CppSharp::CppParser::AST::BinaryOperator*) __nativePtr;
}
} }
CppSharp::Parser::AST::BinaryOperator::BinaryOperator() CppSharp::Parser::AST::BinaryOperator::BinaryOperator()
@ -2213,6 +2390,136 @@ void CppSharp::Parser::AST::BinaryOperator::RHS::set(CppSharp::Parser::AST::Expr
((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->rHS = (::CppSharp::CppParser::AST::Expr*)value->NativePtr; ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->rHS = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
} }
System::String^ CppSharp::Parser::AST::BinaryOperator::OpcodeStr::get()
{
return clix::marshalString<clix::E_UTF8>(((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->opcodeStr);
}
void CppSharp::Parser::AST::BinaryOperator::OpcodeStr::set(System::String^ value)
{
((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->opcodeStr = clix::marshalString<clix::E_UTF8>(value);
}
bool CppSharp::Parser::AST::BinaryOperator::IsPtrMemOp::get()
{
return ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isPtrMemOp;
}
void CppSharp::Parser::AST::BinaryOperator::IsPtrMemOp::set(bool value)
{
((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isPtrMemOp = value;
}
bool CppSharp::Parser::AST::BinaryOperator::IsMultiplicativeOp::get()
{
return ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isMultiplicativeOp;
}
void CppSharp::Parser::AST::BinaryOperator::IsMultiplicativeOp::set(bool value)
{
((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isMultiplicativeOp = value;
}
bool CppSharp::Parser::AST::BinaryOperator::IsAdditiveOp::get()
{
return ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isAdditiveOp;
}
void CppSharp::Parser::AST::BinaryOperator::IsAdditiveOp::set(bool value)
{
((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isAdditiveOp = value;
}
bool CppSharp::Parser::AST::BinaryOperator::IsShiftOp::get()
{
return ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isShiftOp;
}
void CppSharp::Parser::AST::BinaryOperator::IsShiftOp::set(bool value)
{
((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isShiftOp = value;
}
bool CppSharp::Parser::AST::BinaryOperator::IsBitwiseOp::get()
{
return ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isBitwiseOp;
}
void CppSharp::Parser::AST::BinaryOperator::IsBitwiseOp::set(bool value)
{
((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isBitwiseOp = value;
}
bool CppSharp::Parser::AST::BinaryOperator::IsRelationalOp::get()
{
return ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isRelationalOp;
}
void CppSharp::Parser::AST::BinaryOperator::IsRelationalOp::set(bool value)
{
((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isRelationalOp = value;
}
bool CppSharp::Parser::AST::BinaryOperator::IsEqualityOp::get()
{
return ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isEqualityOp;
}
void CppSharp::Parser::AST::BinaryOperator::IsEqualityOp::set(bool value)
{
((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isEqualityOp = value;
}
bool CppSharp::Parser::AST::BinaryOperator::IsComparisonOp::get()
{
return ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isComparisonOp;
}
void CppSharp::Parser::AST::BinaryOperator::IsComparisonOp::set(bool value)
{
((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isComparisonOp = value;
}
bool CppSharp::Parser::AST::BinaryOperator::IsLogicalOp::get()
{
return ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isLogicalOp;
}
void CppSharp::Parser::AST::BinaryOperator::IsLogicalOp::set(bool value)
{
((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isLogicalOp = value;
}
bool CppSharp::Parser::AST::BinaryOperator::IsAssignmentOp::get()
{
return ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isAssignmentOp;
}
void CppSharp::Parser::AST::BinaryOperator::IsAssignmentOp::set(bool value)
{
((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isAssignmentOp = value;
}
bool CppSharp::Parser::AST::BinaryOperator::IsCompoundAssignmentOp::get()
{
return ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isCompoundAssignmentOp;
}
void CppSharp::Parser::AST::BinaryOperator::IsCompoundAssignmentOp::set(bool value)
{
((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isCompoundAssignmentOp = value;
}
bool CppSharp::Parser::AST::BinaryOperator::IsShiftAssignOp::get()
{
return ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isShiftAssignOp;
}
void CppSharp::Parser::AST::BinaryOperator::IsShiftAssignOp::set(bool value)
{
((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isShiftAssignOp = value;
}
bool CppSharp::Parser::AST::BinaryOperator::IsFPContractableWithinStatement::get() bool CppSharp::Parser::AST::BinaryOperator::IsFPContractableWithinStatement::get()
{ {
return ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isFPContractableWithinStatement; return ((::CppSharp::CppParser::AST::BinaryOperator*)NativePtr)->isFPContractableWithinStatement;
@ -2245,6 +2552,12 @@ CppSharp::Parser::AST::CompoundAssignOperator^ CppSharp::Parser::AST::CompoundAs
CppSharp::Parser::AST::CompoundAssignOperator::~CompoundAssignOperator() CppSharp::Parser::AST::CompoundAssignOperator::~CompoundAssignOperator()
{ {
if (NativePtr)
{
auto __nativePtr = NativePtr;
NativePtr = 0;
delete (::CppSharp::CppParser::AST::CompoundAssignOperator*) __nativePtr;
}
} }
CppSharp::Parser::AST::CompoundAssignOperator::CompoundAssignOperator() CppSharp::Parser::AST::CompoundAssignOperator::CompoundAssignOperator()
@ -3796,6 +4109,16 @@ void CppSharp::Parser::AST::GenericSelectionExpr::RParenLoc::set(CppSharp::Parse
((::CppSharp::CppParser::AST::GenericSelectionExpr*)NativePtr)->rParenLoc = _marshal0; ((::CppSharp::CppParser::AST::GenericSelectionExpr*)NativePtr)->rParenLoc = _marshal0;
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::GenericSelectionExpr::ControllingExpr::get()
{
return (((::CppSharp::CppParser::AST::GenericSelectionExpr*)NativePtr)->controllingExpr == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::GenericSelectionExpr*)NativePtr)->controllingExpr);
}
void CppSharp::Parser::AST::GenericSelectionExpr::ControllingExpr::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::GenericSelectionExpr*)NativePtr)->controllingExpr = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
bool CppSharp::Parser::AST::GenericSelectionExpr::IsResultDependent::get() bool CppSharp::Parser::AST::GenericSelectionExpr::IsResultDependent::get()
{ {
return ((::CppSharp::CppParser::AST::GenericSelectionExpr*)NativePtr)->isResultDependent; return ((::CppSharp::CppParser::AST::GenericSelectionExpr*)NativePtr)->isResultDependent;
@ -3816,6 +4139,16 @@ void CppSharp::Parser::AST::GenericSelectionExpr::ResultIndex::set(unsigned int
((::CppSharp::CppParser::AST::GenericSelectionExpr*)NativePtr)->resultIndex = value; ((::CppSharp::CppParser::AST::GenericSelectionExpr*)NativePtr)->resultIndex = value;
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::GenericSelectionExpr::ResultExpr::get()
{
return (((::CppSharp::CppParser::AST::GenericSelectionExpr*)NativePtr)->resultExpr == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::GenericSelectionExpr*)NativePtr)->resultExpr);
}
void CppSharp::Parser::AST::GenericSelectionExpr::ResultExpr::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::GenericSelectionExpr*)NativePtr)->resultExpr = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::AST::ExtVectorElementExpr::ExtVectorElementExpr(::CppSharp::CppParser::AST::ExtVectorElementExpr* native) CppSharp::Parser::AST::ExtVectorElementExpr::ExtVectorElementExpr(::CppSharp::CppParser::AST::ExtVectorElementExpr* native)
: CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native) : CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native)
{ {
@ -3942,6 +4275,16 @@ void CppSharp::Parser::AST::BlockExpr::CaretLocation::set(CppSharp::Parser::Sour
((::CppSharp::CppParser::AST::BlockExpr*)NativePtr)->caretLocation = _marshal0; ((::CppSharp::CppParser::AST::BlockExpr*)NativePtr)->caretLocation = _marshal0;
} }
CppSharp::Parser::AST::Stmt^ CppSharp::Parser::AST::BlockExpr::Body::get()
{
return (((::CppSharp::CppParser::AST::BlockExpr*)NativePtr)->body == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)((::CppSharp::CppParser::AST::BlockExpr*)NativePtr)->body);
}
void CppSharp::Parser::AST::BlockExpr::Body::set(CppSharp::Parser::AST::Stmt^ value)
{
((::CppSharp::CppParser::AST::BlockExpr*)NativePtr)->body = (::CppSharp::CppParser::AST::Stmt*)value->NativePtr;
}
CppSharp::Parser::AST::AsTypeExpr::AsTypeExpr(::CppSharp::CppParser::AST::AsTypeExpr* native) CppSharp::Parser::AST::AsTypeExpr::AsTypeExpr(::CppSharp::CppParser::AST::AsTypeExpr* native)
: CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native) : CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native)
{ {
@ -4038,6 +4381,16 @@ CppSharp::Parser::AST::PseudoObjectExpr::PseudoObjectExpr(CppSharp::Parser::AST:
NativePtr = new ::CppSharp::CppParser::AST::PseudoObjectExpr(__arg0); NativePtr = new ::CppSharp::CppParser::AST::PseudoObjectExpr(__arg0);
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::PseudoObjectExpr::SyntacticForm::get()
{
return (((::CppSharp::CppParser::AST::PseudoObjectExpr*)NativePtr)->syntacticForm == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::PseudoObjectExpr*)NativePtr)->syntacticForm);
}
void CppSharp::Parser::AST::PseudoObjectExpr::SyntacticForm::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::PseudoObjectExpr*)NativePtr)->syntacticForm = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
unsigned int CppSharp::Parser::AST::PseudoObjectExpr::ResultExprIndex::get() unsigned int CppSharp::Parser::AST::PseudoObjectExpr::ResultExprIndex::get()
{ {
return ((::CppSharp::CppParser::AST::PseudoObjectExpr*)NativePtr)->resultExprIndex; return ((::CppSharp::CppParser::AST::PseudoObjectExpr*)NativePtr)->resultExprIndex;
@ -4048,6 +4401,16 @@ void CppSharp::Parser::AST::PseudoObjectExpr::ResultExprIndex::set(unsigned int
((::CppSharp::CppParser::AST::PseudoObjectExpr*)NativePtr)->resultExprIndex = value; ((::CppSharp::CppParser::AST::PseudoObjectExpr*)NativePtr)->resultExprIndex = value;
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::PseudoObjectExpr::ResultExpr::get()
{
return (((::CppSharp::CppParser::AST::PseudoObjectExpr*)NativePtr)->resultExpr == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::PseudoObjectExpr*)NativePtr)->resultExpr);
}
void CppSharp::Parser::AST::PseudoObjectExpr::ResultExpr::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::PseudoObjectExpr*)NativePtr)->resultExpr = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
unsigned int CppSharp::Parser::AST::PseudoObjectExpr::NumSemanticExprs::get() unsigned int CppSharp::Parser::AST::PseudoObjectExpr::NumSemanticExprs::get()
{ {
return ((::CppSharp::CppParser::AST::PseudoObjectExpr*)NativePtr)->numSemanticExprs; return ((::CppSharp::CppParser::AST::PseudoObjectExpr*)NativePtr)->numSemanticExprs;
@ -4179,6 +4542,16 @@ void CppSharp::Parser::AST::AtomicExpr::Op::set(CppSharp::Parser::AST::AtomicExp
((::CppSharp::CppParser::AST::AtomicExpr*)NativePtr)->op = (::CppSharp::CppParser::AST::AtomicExpr::AtomicOp)value; ((::CppSharp::CppParser::AST::AtomicExpr*)NativePtr)->op = (::CppSharp::CppParser::AST::AtomicExpr::AtomicOp)value;
} }
unsigned int CppSharp::Parser::AST::AtomicExpr::NumSubExprs::get()
{
return ((::CppSharp::CppParser::AST::AtomicExpr*)NativePtr)->numSubExprs;
}
void CppSharp::Parser::AST::AtomicExpr::NumSubExprs::set(unsigned int value)
{
((::CppSharp::CppParser::AST::AtomicExpr*)NativePtr)->numSubExprs = value;
}
bool CppSharp::Parser::AST::AtomicExpr::IsVolatile::get() bool CppSharp::Parser::AST::AtomicExpr::IsVolatile::get()
{ {
return ((::CppSharp::CppParser::AST::AtomicExpr*)NativePtr)->isVolatile; return ((::CppSharp::CppParser::AST::AtomicExpr*)NativePtr)->isVolatile;
@ -4311,6 +4684,16 @@ void CppSharp::Parser::AST::CXXOperatorCallExpr::Operator::set(CppSharp::Parser:
((::CppSharp::CppParser::AST::CXXOperatorCallExpr*)NativePtr)->_operator = (::CppSharp::CppParser::AST::OverloadedOperatorKind)value; ((::CppSharp::CppParser::AST::CXXOperatorCallExpr*)NativePtr)->_operator = (::CppSharp::CppParser::AST::OverloadedOperatorKind)value;
} }
bool CppSharp::Parser::AST::CXXOperatorCallExpr::IsAssignmentOp::get()
{
return ((::CppSharp::CppParser::AST::CXXOperatorCallExpr*)NativePtr)->isAssignmentOp;
}
void CppSharp::Parser::AST::CXXOperatorCallExpr::IsAssignmentOp::set(bool value)
{
((::CppSharp::CppParser::AST::CXXOperatorCallExpr*)NativePtr)->isAssignmentOp = value;
}
bool CppSharp::Parser::AST::CXXOperatorCallExpr::IsInfixBinaryOp::get() bool CppSharp::Parser::AST::CXXOperatorCallExpr::IsInfixBinaryOp::get()
{ {
return ((::CppSharp::CppParser::AST::CXXOperatorCallExpr*)NativePtr)->isInfixBinaryOp; return ((::CppSharp::CppParser::AST::CXXOperatorCallExpr*)NativePtr)->isInfixBinaryOp;
@ -4720,6 +5103,16 @@ void CppSharp::Parser::AST::UserDefinedLiteral::literalOperatorKind::set(CppShar
((::CppSharp::CppParser::AST::UserDefinedLiteral*)NativePtr)->literalOperatorKind = (::CppSharp::CppParser::AST::UserDefinedLiteral::LiteralOperatorKind)value; ((::CppSharp::CppParser::AST::UserDefinedLiteral*)NativePtr)->literalOperatorKind = (::CppSharp::CppParser::AST::UserDefinedLiteral::LiteralOperatorKind)value;
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::UserDefinedLiteral::CookedLiteral::get()
{
return (((::CppSharp::CppParser::AST::UserDefinedLiteral*)NativePtr)->cookedLiteral == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::UserDefinedLiteral*)NativePtr)->cookedLiteral);
}
void CppSharp::Parser::AST::UserDefinedLiteral::CookedLiteral::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::UserDefinedLiteral*)NativePtr)->cookedLiteral = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::SourceLocation CppSharp::Parser::AST::UserDefinedLiteral::UDSuffixLoc::get() CppSharp::Parser::SourceLocation CppSharp::Parser::AST::UserDefinedLiteral::UDSuffixLoc::get()
{ {
return CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::AST::UserDefinedLiteral*)NativePtr)->uDSuffixLoc); return CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::AST::UserDefinedLiteral*)NativePtr)->uDSuffixLoc);
@ -4859,6 +5252,16 @@ CppSharp::Parser::AST::CXXStdInitializerListExpr::CXXStdInitializerListExpr(CppS
NativePtr = new ::CppSharp::CppParser::AST::CXXStdInitializerListExpr(__arg0); NativePtr = new ::CppSharp::CppParser::AST::CXXStdInitializerListExpr(__arg0);
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::CXXStdInitializerListExpr::SubExpr::get()
{
return (((::CppSharp::CppParser::AST::CXXStdInitializerListExpr*)NativePtr)->subExpr == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::CXXStdInitializerListExpr*)NativePtr)->subExpr);
}
void CppSharp::Parser::AST::CXXStdInitializerListExpr::SubExpr::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::CXXStdInitializerListExpr*)NativePtr)->subExpr = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::AST::CXXTypeidExpr::CXXTypeidExpr(::CppSharp::CppParser::AST::CXXTypeidExpr* native) CppSharp::Parser::AST::CXXTypeidExpr::CXXTypeidExpr(::CppSharp::CppParser::AST::CXXTypeidExpr* native)
: CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native) : CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native)
{ {
@ -5036,6 +5439,26 @@ void CppSharp::Parser::AST::MSPropertySubscriptExpr::RBracketLoc::set(CppSharp::
((::CppSharp::CppParser::AST::MSPropertySubscriptExpr*)NativePtr)->rBracketLoc = _marshal0; ((::CppSharp::CppParser::AST::MSPropertySubscriptExpr*)NativePtr)->rBracketLoc = _marshal0;
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::MSPropertySubscriptExpr::Base::get()
{
return (((::CppSharp::CppParser::AST::MSPropertySubscriptExpr*)NativePtr)->base == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::MSPropertySubscriptExpr*)NativePtr)->base);
}
void CppSharp::Parser::AST::MSPropertySubscriptExpr::Base::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::MSPropertySubscriptExpr*)NativePtr)->base = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::MSPropertySubscriptExpr::Idx::get()
{
return (((::CppSharp::CppParser::AST::MSPropertySubscriptExpr*)NativePtr)->idx == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::MSPropertySubscriptExpr*)NativePtr)->idx);
}
void CppSharp::Parser::AST::MSPropertySubscriptExpr::Idx::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::MSPropertySubscriptExpr*)NativePtr)->idx = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::AST::CXXUuidofExpr::CXXUuidofExpr(::CppSharp::CppParser::AST::CXXUuidofExpr* native) CppSharp::Parser::AST::CXXUuidofExpr::CXXUuidofExpr(::CppSharp::CppParser::AST::CXXUuidofExpr* native)
: CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native) : CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native)
{ {
@ -5187,6 +5610,16 @@ CppSharp::Parser::AST::CXXThrowExpr::CXXThrowExpr(CppSharp::Parser::AST::CXXThro
NativePtr = new ::CppSharp::CppParser::AST::CXXThrowExpr(__arg0); NativePtr = new ::CppSharp::CppParser::AST::CXXThrowExpr(__arg0);
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::CXXThrowExpr::SubExpr::get()
{
return (((::CppSharp::CppParser::AST::CXXThrowExpr*)NativePtr)->subExpr == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::CXXThrowExpr*)NativePtr)->subExpr);
}
void CppSharp::Parser::AST::CXXThrowExpr::SubExpr::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::CXXThrowExpr*)NativePtr)->subExpr = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::SourceLocation CppSharp::Parser::AST::CXXThrowExpr::ThrowLoc::get() CppSharp::Parser::SourceLocation CppSharp::Parser::AST::CXXThrowExpr::ThrowLoc::get()
{ {
return CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::AST::CXXThrowExpr*)NativePtr)->throwLoc); return CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::AST::CXXThrowExpr*)NativePtr)->throwLoc);
@ -5240,6 +5673,16 @@ CppSharp::Parser::AST::CXXDefaultArgExpr::CXXDefaultArgExpr(CppSharp::Parser::AS
NativePtr = new ::CppSharp::CppParser::AST::CXXDefaultArgExpr(__arg0); NativePtr = new ::CppSharp::CppParser::AST::CXXDefaultArgExpr(__arg0);
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::CXXDefaultArgExpr::Expr::get()
{
return (((::CppSharp::CppParser::AST::CXXDefaultArgExpr*)NativePtr)->expr == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::CXXDefaultArgExpr*)NativePtr)->expr);
}
void CppSharp::Parser::AST::CXXDefaultArgExpr::Expr::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::CXXDefaultArgExpr*)NativePtr)->expr = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::SourceLocation CppSharp::Parser::AST::CXXDefaultArgExpr::UsedLocation::get() CppSharp::Parser::SourceLocation CppSharp::Parser::AST::CXXDefaultArgExpr::UsedLocation::get()
{ {
return CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::AST::CXXDefaultArgExpr*)NativePtr)->usedLocation); return CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::AST::CXXDefaultArgExpr*)NativePtr)->usedLocation);
@ -5283,6 +5726,26 @@ CppSharp::Parser::AST::CXXDefaultInitExpr::CXXDefaultInitExpr(CppSharp::Parser::
NativePtr = new ::CppSharp::CppParser::AST::CXXDefaultInitExpr(__arg0); NativePtr = new ::CppSharp::CppParser::AST::CXXDefaultInitExpr(__arg0);
} }
CppSharp::Parser::AST::Field^ CppSharp::Parser::AST::CXXDefaultInitExpr::Field::get()
{
return (((::CppSharp::CppParser::AST::CXXDefaultInitExpr*)NativePtr)->field == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Field((::CppSharp::CppParser::AST::Field*)((::CppSharp::CppParser::AST::CXXDefaultInitExpr*)NativePtr)->field);
}
void CppSharp::Parser::AST::CXXDefaultInitExpr::Field::set(CppSharp::Parser::AST::Field^ value)
{
((::CppSharp::CppParser::AST::CXXDefaultInitExpr*)NativePtr)->field = (::CppSharp::CppParser::AST::Field*)value->NativePtr;
}
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::CXXDefaultInitExpr::Expr::get()
{
return (((::CppSharp::CppParser::AST::CXXDefaultInitExpr*)NativePtr)->expr == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::CXXDefaultInitExpr*)NativePtr)->expr);
}
void CppSharp::Parser::AST::CXXDefaultInitExpr::Expr::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::CXXDefaultInitExpr*)NativePtr)->expr = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::AST::CXXBindTemporaryExpr::CXXBindTemporaryExpr(::CppSharp::CppParser::AST::CXXBindTemporaryExpr* native) CppSharp::Parser::AST::CXXBindTemporaryExpr::CXXBindTemporaryExpr(::CppSharp::CppParser::AST::CXXBindTemporaryExpr* native)
: CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native) : CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)native)
{ {
@ -6011,6 +6474,16 @@ void CppSharp::Parser::AST::CXXNewExpr::IsArray::set(bool value)
((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->isArray = value; ((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->isArray = value;
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::CXXNewExpr::ArraySize::get()
{
return (((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->arraySize == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->arraySize);
}
void CppSharp::Parser::AST::CXXNewExpr::ArraySize::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->arraySize = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
unsigned int CppSharp::Parser::AST::CXXNewExpr::NumPlacementArgs::get() unsigned int CppSharp::Parser::AST::CXXNewExpr::NumPlacementArgs::get()
{ {
return ((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->numPlacementArgs; return ((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->numPlacementArgs;
@ -6071,6 +6544,16 @@ void CppSharp::Parser::AST::CXXNewExpr::initializationStyle::set(CppSharp::Parse
((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->initializationStyle = (::CppSharp::CppParser::AST::CXXNewExpr::InitializationStyle)value; ((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->initializationStyle = (::CppSharp::CppParser::AST::CXXNewExpr::InitializationStyle)value;
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::CXXNewExpr::Initializer::get()
{
return (((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->initializer == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->initializer);
}
void CppSharp::Parser::AST::CXXNewExpr::Initializer::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->initializer = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::AST::CXXConstructExpr^ CppSharp::Parser::AST::CXXNewExpr::ConstructExpr::get() CppSharp::Parser::AST::CXXConstructExpr^ CppSharp::Parser::AST::CXXNewExpr::ConstructExpr::get()
{ {
return (((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->constructExpr == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::CXXConstructExpr((::CppSharp::CppParser::AST::CXXConstructExpr*)((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->constructExpr); return (((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->constructExpr == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::CXXConstructExpr((::CppSharp::CppParser::AST::CXXConstructExpr*)((::CppSharp::CppParser::AST::CXXNewExpr*)NativePtr)->constructExpr);
@ -6168,6 +6651,16 @@ void CppSharp::Parser::AST::CXXDeleteExpr::OperatorDelete::set(CppSharp::Parser:
((::CppSharp::CppParser::AST::CXXDeleteExpr*)NativePtr)->operatorDelete = (::CppSharp::CppParser::AST::Function*)value->NativePtr; ((::CppSharp::CppParser::AST::CXXDeleteExpr*)NativePtr)->operatorDelete = (::CppSharp::CppParser::AST::Function*)value->NativePtr;
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::CXXDeleteExpr::Argument::get()
{
return (((::CppSharp::CppParser::AST::CXXDeleteExpr*)NativePtr)->argument == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::CXXDeleteExpr*)NativePtr)->argument);
}
void CppSharp::Parser::AST::CXXDeleteExpr::Argument::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::CXXDeleteExpr*)NativePtr)->argument = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::AST::QualifiedType^ CppSharp::Parser::AST::CXXDeleteExpr::DestroyedType::get() CppSharp::Parser::AST::QualifiedType^ CppSharp::Parser::AST::CXXDeleteExpr::DestroyedType::get()
{ {
return (&((::CppSharp::CppParser::AST::CXXDeleteExpr*)NativePtr)->destroyedType == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::QualifiedType((::CppSharp::CppParser::AST::QualifiedType*)&((::CppSharp::CppParser::AST::CXXDeleteExpr*)NativePtr)->destroyedType); return (&((::CppSharp::CppParser::AST::CXXDeleteExpr*)NativePtr)->destroyedType == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::QualifiedType((::CppSharp::CppParser::AST::QualifiedType*)&((::CppSharp::CppParser::AST::CXXDeleteExpr*)NativePtr)->destroyedType);
@ -7197,6 +7690,16 @@ void CppSharp::Parser::AST::UnresolvedMemberExpr::IsImplicitAccess::set(bool val
((::CppSharp::CppParser::AST::UnresolvedMemberExpr*)NativePtr)->isImplicitAccess = value; ((::CppSharp::CppParser::AST::UnresolvedMemberExpr*)NativePtr)->isImplicitAccess = value;
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::UnresolvedMemberExpr::Base::get()
{
return (((::CppSharp::CppParser::AST::UnresolvedMemberExpr*)NativePtr)->base == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::UnresolvedMemberExpr*)NativePtr)->base);
}
void CppSharp::Parser::AST::UnresolvedMemberExpr::Base::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::UnresolvedMemberExpr*)NativePtr)->base = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::AST::QualifiedType^ CppSharp::Parser::AST::UnresolvedMemberExpr::BaseType::get() CppSharp::Parser::AST::QualifiedType^ CppSharp::Parser::AST::UnresolvedMemberExpr::BaseType::get()
{ {
return (&((::CppSharp::CppParser::AST::UnresolvedMemberExpr*)NativePtr)->baseType == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::QualifiedType((::CppSharp::CppParser::AST::QualifiedType*)&((::CppSharp::CppParser::AST::UnresolvedMemberExpr*)NativePtr)->baseType); return (&((::CppSharp::CppParser::AST::UnresolvedMemberExpr*)NativePtr)->baseType == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::QualifiedType((::CppSharp::CppParser::AST::QualifiedType*)&((::CppSharp::CppParser::AST::UnresolvedMemberExpr*)NativePtr)->baseType);
@ -7333,6 +7836,16 @@ CppSharp::Parser::AST::PackExpansionExpr::PackExpansionExpr(CppSharp::Parser::AS
NativePtr = new ::CppSharp::CppParser::AST::PackExpansionExpr(__arg0); NativePtr = new ::CppSharp::CppParser::AST::PackExpansionExpr(__arg0);
} }
CppSharp::Parser::AST::Expr^ CppSharp::Parser::AST::PackExpansionExpr::Pattern::get()
{
return (((::CppSharp::CppParser::AST::PackExpansionExpr*)NativePtr)->pattern == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Expr((::CppSharp::CppParser::AST::Expr*)((::CppSharp::CppParser::AST::PackExpansionExpr*)NativePtr)->pattern);
}
void CppSharp::Parser::AST::PackExpansionExpr::Pattern::set(CppSharp::Parser::AST::Expr^ value)
{
((::CppSharp::CppParser::AST::PackExpansionExpr*)NativePtr)->pattern = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
}
CppSharp::Parser::SourceLocation CppSharp::Parser::AST::PackExpansionExpr::EllipsisLoc::get() CppSharp::Parser::SourceLocation CppSharp::Parser::AST::PackExpansionExpr::EllipsisLoc::get()
{ {
return CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::AST::PackExpansionExpr*)NativePtr)->ellipsisLoc); return CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::AST::PackExpansionExpr*)NativePtr)->ellipsisLoc);

300
src/CppParser/Bindings/CLI/Expr.h

@ -575,6 +575,24 @@ namespace CppSharp
void set(bool); void set(bool);
} }
property CppSharp::Parser::AST::Field^ SourceBitField
{
CppSharp::Parser::AST::Field^ get();
void set(CppSharp::Parser::AST::Field^);
}
property CppSharp::Parser::AST::Declaration^ ReferencedDeclOfCallee
{
CppSharp::Parser::AST::Declaration^ get();
void set(CppSharp::Parser::AST::Declaration^);
}
property bool HasPlaceholderType
{
bool get();
void set(bool);
}
static operator CppSharp::Parser::AST::Expr^(CppSharp::Parser::AST::StmtClass klass); static operator CppSharp::Parser::AST::Expr^(CppSharp::Parser::AST::StmtClass klass);
}; };
@ -675,6 +693,12 @@ namespace CppSharp
void set(bool); void set(bool);
} }
property CppSharp::Parser::AST::Declaration^ FoundDecl
{
CppSharp::Parser::AST::Declaration^ get();
void set(CppSharp::Parser::AST::Declaration^);
}
property bool HasTemplateKWAndArgsInfo property bool HasTemplateKWAndArgsInfo
{ {
bool get(); bool get();
@ -1079,6 +1103,42 @@ namespace CppSharp
bool get(); bool get();
void set(bool); void set(bool);
} }
property bool IsPrefix
{
bool get();
void set(bool);
}
property bool IsPostfix
{
bool get();
void set(bool);
}
property bool IsIncrementOp
{
bool get();
void set(bool);
}
property bool IsDecrementOp
{
bool get();
void set(bool);
}
property bool IsIncrementDecrementOp
{
bool get();
void set(bool);
}
property bool IsArithmeticOp
{
bool get();
void set(bool);
}
}; };
public ref class OffsetOfExpr : CppSharp::Parser::AST::Expr public ref class OffsetOfExpr : CppSharp::Parser::AST::Expr
@ -1160,6 +1220,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::QualifiedType^); void set(CppSharp::Parser::AST::QualifiedType^);
} }
property CppSharp::Parser::AST::Expr^ ArgumentExpr
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property CppSharp::Parser::AST::QualifiedType^ TypeOfArgument property CppSharp::Parser::AST::QualifiedType^ TypeOfArgument
{ {
CppSharp::Parser::AST::QualifiedType^ get(); CppSharp::Parser::AST::QualifiedType^ get();
@ -1196,6 +1262,18 @@ namespace CppSharp
CppSharp::Parser::SourceLocation get(); CppSharp::Parser::SourceLocation get();
void set(CppSharp::Parser::SourceLocation); void set(CppSharp::Parser::SourceLocation);
} }
property CppSharp::Parser::AST::Expr^ Base
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property CppSharp::Parser::AST::Expr^ Idx
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
}; };
public ref class CallExpr : CppSharp::Parser::AST::Expr public ref class CallExpr : CppSharp::Parser::AST::Expr
@ -1230,6 +1308,18 @@ namespace CppSharp
void set(CppSharp::Parser::SourceLocation); void set(CppSharp::Parser::SourceLocation);
} }
property CppSharp::Parser::AST::Declaration^ CalleeDecl
{
CppSharp::Parser::AST::Declaration^ get();
void set(CppSharp::Parser::AST::Declaration^);
}
property CppSharp::Parser::AST::Function^ DirectCallee
{
CppSharp::Parser::AST::Function^ get();
void set(CppSharp::Parser::AST::Function^);
}
property unsigned int NumArgs property unsigned int NumArgs
{ {
unsigned int get(); unsigned int get();
@ -1416,6 +1506,18 @@ namespace CppSharp
void set(CppSharp::Parser::AST::Expr^); void set(CppSharp::Parser::AST::Expr^);
} }
property System::String^ CastKindName
{
System::String^ get();
void set(System::String^);
}
property CppSharp::Parser::AST::Expr^ SubExprAsWritten
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property CppSharp::Parser::AST::Declaration^ ConversionFunction property CppSharp::Parser::AST::Declaration^ ConversionFunction
{ {
CppSharp::Parser::AST::Declaration^ get(); CppSharp::Parser::AST::Declaration^ get();
@ -1547,6 +1649,84 @@ namespace CppSharp
void set(CppSharp::Parser::AST::Expr^); void set(CppSharp::Parser::AST::Expr^);
} }
property System::String^ OpcodeStr
{
System::String^ get();
void set(System::String^);
}
property bool IsPtrMemOp
{
bool get();
void set(bool);
}
property bool IsMultiplicativeOp
{
bool get();
void set(bool);
}
property bool IsAdditiveOp
{
bool get();
void set(bool);
}
property bool IsShiftOp
{
bool get();
void set(bool);
}
property bool IsBitwiseOp
{
bool get();
void set(bool);
}
property bool IsRelationalOp
{
bool get();
void set(bool);
}
property bool IsEqualityOp
{
bool get();
void set(bool);
}
property bool IsComparisonOp
{
bool get();
void set(bool);
}
property bool IsLogicalOp
{
bool get();
void set(bool);
}
property bool IsAssignmentOp
{
bool get();
void set(bool);
}
property bool IsCompoundAssignmentOp
{
bool get();
void set(bool);
}
property bool IsShiftAssignOp
{
bool get();
void set(bool);
}
property bool IsFPContractableWithinStatement property bool IsFPContractableWithinStatement
{ {
bool get(); bool get();
@ -2344,6 +2524,12 @@ namespace CppSharp
void set(CppSharp::Parser::SourceLocation); void set(CppSharp::Parser::SourceLocation);
} }
property CppSharp::Parser::AST::Expr^ ControllingExpr
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property bool IsResultDependent property bool IsResultDependent
{ {
bool get(); bool get();
@ -2355,6 +2541,12 @@ namespace CppSharp
unsigned int get(); unsigned int get();
void set(unsigned int); void set(unsigned int);
} }
property CppSharp::Parser::AST::Expr^ ResultExpr
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
}; };
public ref class ExtVectorElementExpr : CppSharp::Parser::AST::Expr public ref class ExtVectorElementExpr : CppSharp::Parser::AST::Expr
@ -2417,6 +2609,12 @@ namespace CppSharp
CppSharp::Parser::SourceLocation get(); CppSharp::Parser::SourceLocation get();
void set(CppSharp::Parser::SourceLocation); void set(CppSharp::Parser::SourceLocation);
} }
property CppSharp::Parser::AST::Stmt^ Body
{
CppSharp::Parser::AST::Stmt^ get();
void set(CppSharp::Parser::AST::Stmt^);
}
}; };
public ref class AsTypeExpr : CppSharp::Parser::AST::Expr public ref class AsTypeExpr : CppSharp::Parser::AST::Expr
@ -2462,12 +2660,24 @@ namespace CppSharp
~PseudoObjectExpr(); ~PseudoObjectExpr();
property CppSharp::Parser::AST::Expr^ SyntacticForm
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property unsigned int ResultExprIndex property unsigned int ResultExprIndex
{ {
unsigned int get(); unsigned int get();
void set(unsigned int); void set(unsigned int);
} }
property CppSharp::Parser::AST::Expr^ ResultExpr
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property unsigned int NumSemanticExprs property unsigned int NumSemanticExprs
{ {
unsigned int get(); unsigned int get();
@ -2591,6 +2801,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::AtomicExpr::AtomicOp); void set(CppSharp::Parser::AST::AtomicExpr::AtomicOp);
} }
property unsigned int NumSubExprs
{
unsigned int get();
void set(unsigned int);
}
property bool IsVolatile property bool IsVolatile
{ {
bool get(); bool get();
@ -2653,6 +2869,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::OverloadedOperatorKind); void set(CppSharp::Parser::AST::OverloadedOperatorKind);
} }
property bool IsAssignmentOp
{
bool get();
void set(bool);
}
property bool IsInfixBinaryOp property bool IsInfixBinaryOp
{ {
bool get(); bool get();
@ -2843,6 +3065,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::UserDefinedLiteral::LiteralOperatorKind); void set(CppSharp::Parser::AST::UserDefinedLiteral::LiteralOperatorKind);
} }
property CppSharp::Parser::AST::Expr^ CookedLiteral
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property CppSharp::Parser::SourceLocation UDSuffixLoc property CppSharp::Parser::SourceLocation UDSuffixLoc
{ {
CppSharp::Parser::SourceLocation get(); CppSharp::Parser::SourceLocation get();
@ -2905,6 +3133,12 @@ namespace CppSharp
CXXStdInitializerListExpr(CppSharp::Parser::AST::CXXStdInitializerListExpr^ _0); CXXStdInitializerListExpr(CppSharp::Parser::AST::CXXStdInitializerListExpr^ _0);
~CXXStdInitializerListExpr(); ~CXXStdInitializerListExpr();
property CppSharp::Parser::AST::Expr^ SubExpr
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
}; };
public ref class CXXTypeidExpr : CppSharp::Parser::AST::Expr public ref class CXXTypeidExpr : CppSharp::Parser::AST::Expr
@ -2992,6 +3226,18 @@ namespace CppSharp
CppSharp::Parser::SourceLocation get(); CppSharp::Parser::SourceLocation get();
void set(CppSharp::Parser::SourceLocation); void set(CppSharp::Parser::SourceLocation);
} }
property CppSharp::Parser::AST::Expr^ Base
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property CppSharp::Parser::AST::Expr^ Idx
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
}; };
public ref class CXXUuidofExpr : CppSharp::Parser::AST::Expr public ref class CXXUuidofExpr : CppSharp::Parser::AST::Expr
@ -3062,6 +3308,12 @@ namespace CppSharp
~CXXThrowExpr(); ~CXXThrowExpr();
property CppSharp::Parser::AST::Expr^ SubExpr
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property CppSharp::Parser::SourceLocation ThrowLoc property CppSharp::Parser::SourceLocation ThrowLoc
{ {
CppSharp::Parser::SourceLocation get(); CppSharp::Parser::SourceLocation get();
@ -3087,6 +3339,12 @@ namespace CppSharp
~CXXDefaultArgExpr(); ~CXXDefaultArgExpr();
property CppSharp::Parser::AST::Expr^ Expr
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property CppSharp::Parser::SourceLocation UsedLocation property CppSharp::Parser::SourceLocation UsedLocation
{ {
CppSharp::Parser::SourceLocation get(); CppSharp::Parser::SourceLocation get();
@ -3105,6 +3363,18 @@ namespace CppSharp
CXXDefaultInitExpr(CppSharp::Parser::AST::CXXDefaultInitExpr^ _0); CXXDefaultInitExpr(CppSharp::Parser::AST::CXXDefaultInitExpr^ _0);
~CXXDefaultInitExpr(); ~CXXDefaultInitExpr();
property CppSharp::Parser::AST::Field^ Field
{
CppSharp::Parser::AST::Field^ get();
void set(CppSharp::Parser::AST::Field^);
}
property CppSharp::Parser::AST::Expr^ Expr
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
}; };
public ref class CXXBindTemporaryExpr : CppSharp::Parser::AST::Expr public ref class CXXBindTemporaryExpr : CppSharp::Parser::AST::Expr
@ -3443,6 +3713,12 @@ namespace CppSharp
void set(bool); void set(bool);
} }
property CppSharp::Parser::AST::Expr^ ArraySize
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property unsigned int NumPlacementArgs property unsigned int NumPlacementArgs
{ {
unsigned int get(); unsigned int get();
@ -3479,6 +3755,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::CXXNewExpr::InitializationStyle); void set(CppSharp::Parser::AST::CXXNewExpr::InitializationStyle);
} }
property CppSharp::Parser::AST::Expr^ Initializer
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property CppSharp::Parser::AST::CXXConstructExpr^ ConstructExpr property CppSharp::Parser::AST::CXXConstructExpr^ ConstructExpr
{ {
CppSharp::Parser::AST::CXXConstructExpr^ get(); CppSharp::Parser::AST::CXXConstructExpr^ get();
@ -3539,6 +3821,12 @@ namespace CppSharp
void set(CppSharp::Parser::AST::Function^); void set(CppSharp::Parser::AST::Function^);
} }
property CppSharp::Parser::AST::Expr^ Argument
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property CppSharp::Parser::AST::QualifiedType^ DestroyedType property CppSharp::Parser::AST::QualifiedType^ DestroyedType
{ {
CppSharp::Parser::AST::QualifiedType^ get(); CppSharp::Parser::AST::QualifiedType^ get();
@ -4050,6 +4338,12 @@ namespace CppSharp
void set(bool); void set(bool);
} }
property CppSharp::Parser::AST::Expr^ Base
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property CppSharp::Parser::AST::QualifiedType^ BaseType property CppSharp::Parser::AST::QualifiedType^ BaseType
{ {
CppSharp::Parser::AST::QualifiedType^ get(); CppSharp::Parser::AST::QualifiedType^ get();
@ -4118,6 +4412,12 @@ namespace CppSharp
~PackExpansionExpr(); ~PackExpansionExpr();
property CppSharp::Parser::AST::Expr^ Pattern
{
CppSharp::Parser::AST::Expr^ get();
void set(CppSharp::Parser::AST::Expr^);
}
property CppSharp::Parser::SourceLocation EllipsisLoc property CppSharp::Parser::SourceLocation EllipsisLoc
{ {
CppSharp::Parser::SourceLocation get(); CppSharp::Parser::SourceLocation get();

170
src/CppParser/Bindings/CLI/Stmt.cpp

@ -101,6 +101,16 @@ void CppSharp::Parser::AST::Stmt::EndLoc::set(CppSharp::Parser::SourceLocation v
((::CppSharp::CppParser::AST::Stmt*)NativePtr)->endLoc = _marshal0; ((::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::DeclStmt::DeclStmt(::CppSharp::CppParser::AST::DeclStmt* native)
: CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)native) : CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)native)
{ {
@ -190,6 +200,16 @@ void CppSharp::Parser::AST::DeclStmt::IsSingleDecl::set(bool value)
((::CppSharp::CppParser::AST::DeclStmt*)NativePtr)->isSingleDecl = value; ((::CppSharp::CppParser::AST::DeclStmt*)NativePtr)->isSingleDecl = value;
} }
CppSharp::Parser::AST::Declaration^ CppSharp::Parser::AST::DeclStmt::SingleDecl::get()
{
return (((::CppSharp::CppParser::AST::DeclStmt*)NativePtr)->singleDecl == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Declaration((::CppSharp::CppParser::AST::Declaration*)((::CppSharp::CppParser::AST::DeclStmt*)NativePtr)->singleDecl);
}
void CppSharp::Parser::AST::DeclStmt::SingleDecl::set(CppSharp::Parser::AST::Declaration^ value)
{
((::CppSharp::CppParser::AST::DeclStmt*)NativePtr)->singleDecl = (::CppSharp::CppParser::AST::Declaration*)value->NativePtr;
}
unsigned int CppSharp::Parser::AST::DeclStmt::GetdeclsCount::get() unsigned int CppSharp::Parser::AST::DeclStmt::GetdeclsCount::get()
{ {
auto __ret = ((::CppSharp::CppParser::AST::DeclStmt*)NativePtr)->getdeclsCount(); auto __ret = ((::CppSharp::CppParser::AST::DeclStmt*)NativePtr)->getdeclsCount();
@ -348,6 +368,26 @@ void CppSharp::Parser::AST::CompoundStmt::Size::set(unsigned int value)
((::CppSharp::CppParser::AST::CompoundStmt*)NativePtr)->size = value; ((::CppSharp::CppParser::AST::CompoundStmt*)NativePtr)->size = value;
} }
CppSharp::Parser::AST::Stmt^ CppSharp::Parser::AST::CompoundStmt::BodyFront::get()
{
return (((::CppSharp::CppParser::AST::CompoundStmt*)NativePtr)->body_front == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)((::CppSharp::CppParser::AST::CompoundStmt*)NativePtr)->body_front);
}
void CppSharp::Parser::AST::CompoundStmt::BodyFront::set(CppSharp::Parser::AST::Stmt^ value)
{
((::CppSharp::CppParser::AST::CompoundStmt*)NativePtr)->body_front = (::CppSharp::CppParser::AST::Stmt*)value->NativePtr;
}
CppSharp::Parser::AST::Stmt^ CppSharp::Parser::AST::CompoundStmt::BodyBack::get()
{
return (((::CppSharp::CppParser::AST::CompoundStmt*)NativePtr)->body_back == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)((::CppSharp::CppParser::AST::CompoundStmt*)NativePtr)->body_back);
}
void CppSharp::Parser::AST::CompoundStmt::BodyBack::set(CppSharp::Parser::AST::Stmt^ value)
{
((::CppSharp::CppParser::AST::CompoundStmt*)NativePtr)->body_back = (::CppSharp::CppParser::AST::Stmt*)value->NativePtr;
}
CppSharp::Parser::SourceLocation CppSharp::Parser::AST::CompoundStmt::LBracLoc::get() CppSharp::Parser::SourceLocation CppSharp::Parser::AST::CompoundStmt::LBracLoc::get()
{ {
return CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::AST::CompoundStmt*)NativePtr)->lBracLoc); return CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::AST::CompoundStmt*)NativePtr)->lBracLoc);
@ -449,6 +489,16 @@ void CppSharp::Parser::AST::SwitchCase::ColonLoc::set(CppSharp::Parser::SourceLo
((::CppSharp::CppParser::AST::SwitchCase*)NativePtr)->colonLoc = _marshal0; ((::CppSharp::CppParser::AST::SwitchCase*)NativePtr)->colonLoc = _marshal0;
} }
CppSharp::Parser::AST::Stmt^ CppSharp::Parser::AST::SwitchCase::SubStmt::get()
{
return (((::CppSharp::CppParser::AST::SwitchCase*)NativePtr)->subStmt == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)((::CppSharp::CppParser::AST::SwitchCase*)NativePtr)->subStmt);
}
void CppSharp::Parser::AST::SwitchCase::SubStmt::set(CppSharp::Parser::AST::Stmt^ value)
{
((::CppSharp::CppParser::AST::SwitchCase*)NativePtr)->subStmt = (::CppSharp::CppParser::AST::Stmt*)value->NativePtr;
}
CppSharp::Parser::AST::CaseStmt::CaseStmt(::CppSharp::CppParser::AST::CaseStmt* native) CppSharp::Parser::AST::CaseStmt::CaseStmt(::CppSharp::CppParser::AST::CaseStmt* native)
: CppSharp::Parser::AST::SwitchCase((::CppSharp::CppParser::AST::SwitchCase*)native) : CppSharp::Parser::AST::SwitchCase((::CppSharp::CppParser::AST::SwitchCase*)native)
{ {
@ -524,16 +574,6 @@ void CppSharp::Parser::AST::CaseStmt::RHS::set(CppSharp::Parser::AST::Expr^ valu
((::CppSharp::CppParser::AST::CaseStmt*)NativePtr)->rHS = (::CppSharp::CppParser::AST::Expr*)value->NativePtr; ((::CppSharp::CppParser::AST::CaseStmt*)NativePtr)->rHS = (::CppSharp::CppParser::AST::Expr*)value->NativePtr;
} }
CppSharp::Parser::AST::Stmt^ CppSharp::Parser::AST::CaseStmt::SubStmt::get()
{
return (((::CppSharp::CppParser::AST::CaseStmt*)NativePtr)->subStmt == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)((::CppSharp::CppParser::AST::CaseStmt*)NativePtr)->subStmt);
}
void CppSharp::Parser::AST::CaseStmt::SubStmt::set(CppSharp::Parser::AST::Stmt^ value)
{
((::CppSharp::CppParser::AST::CaseStmt*)NativePtr)->subStmt = (::CppSharp::CppParser::AST::Stmt*)value->NativePtr;
}
bool CppSharp::Parser::AST::CaseStmt::CaseStmtIsGNURange::get() bool CppSharp::Parser::AST::CaseStmt::CaseStmtIsGNURange::get()
{ {
return ((::CppSharp::CppParser::AST::CaseStmt*)NativePtr)->caseStmtIsGNURange; return ((::CppSharp::CppParser::AST::CaseStmt*)NativePtr)->caseStmtIsGNURange;
@ -575,16 +615,6 @@ CppSharp::Parser::AST::DefaultStmt::DefaultStmt(CppSharp::Parser::AST::DefaultSt
NativePtr = new ::CppSharp::CppParser::AST::DefaultStmt(__arg0); NativePtr = new ::CppSharp::CppParser::AST::DefaultStmt(__arg0);
} }
CppSharp::Parser::AST::Stmt^ CppSharp::Parser::AST::DefaultStmt::SubStmt::get()
{
return (((::CppSharp::CppParser::AST::DefaultStmt*)NativePtr)->subStmt == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)((::CppSharp::CppParser::AST::DefaultStmt*)NativePtr)->subStmt);
}
void CppSharp::Parser::AST::DefaultStmt::SubStmt::set(CppSharp::Parser::AST::Stmt^ value)
{
((::CppSharp::CppParser::AST::DefaultStmt*)NativePtr)->subStmt = (::CppSharp::CppParser::AST::Stmt*)value->NativePtr;
}
CppSharp::Parser::SourceLocation CppSharp::Parser::AST::DefaultStmt::DefaultLoc::get() CppSharp::Parser::SourceLocation CppSharp::Parser::AST::DefaultStmt::DefaultLoc::get()
{ {
return CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::AST::DefaultStmt*)NativePtr)->defaultLoc); return CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::AST::DefaultStmt*)NativePtr)->defaultLoc);
@ -704,6 +734,16 @@ void CppSharp::Parser::AST::AttributedStmt::AttrLoc::set(CppSharp::Parser::Sourc
((::CppSharp::CppParser::AST::AttributedStmt*)NativePtr)->attrLoc = _marshal0; ((::CppSharp::CppParser::AST::AttributedStmt*)NativePtr)->attrLoc = _marshal0;
} }
CppSharp::Parser::AST::Stmt^ CppSharp::Parser::AST::AttributedStmt::SubStmt::get()
{
return (((::CppSharp::CppParser::AST::AttributedStmt*)NativePtr)->subStmt == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)((::CppSharp::CppParser::AST::AttributedStmt*)NativePtr)->subStmt);
}
void CppSharp::Parser::AST::AttributedStmt::SubStmt::set(CppSharp::Parser::AST::Stmt^ value)
{
((::CppSharp::CppParser::AST::AttributedStmt*)NativePtr)->subStmt = (::CppSharp::CppParser::AST::Stmt*)value->NativePtr;
}
CppSharp::Parser::AST::IfStmt::IfStmt(::CppSharp::CppParser::AST::IfStmt* native) CppSharp::Parser::AST::IfStmt::IfStmt(::CppSharp::CppParser::AST::IfStmt* native)
: CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)native) : CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)native)
{ {
@ -839,6 +879,16 @@ void CppSharp::Parser::AST::IfStmt::HasElseStorage::set(bool value)
((::CppSharp::CppParser::AST::IfStmt*)NativePtr)->hasElseStorage = value; ((::CppSharp::CppParser::AST::IfStmt*)NativePtr)->hasElseStorage = value;
} }
CppSharp::Parser::AST::DeclStmt^ CppSharp::Parser::AST::IfStmt::ConditionVariableDeclStmt::get()
{
return (((::CppSharp::CppParser::AST::IfStmt*)NativePtr)->conditionVariableDeclStmt == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::DeclStmt((::CppSharp::CppParser::AST::DeclStmt*)((::CppSharp::CppParser::AST::IfStmt*)NativePtr)->conditionVariableDeclStmt);
}
void CppSharp::Parser::AST::IfStmt::ConditionVariableDeclStmt::set(CppSharp::Parser::AST::DeclStmt^ value)
{
((::CppSharp::CppParser::AST::IfStmt*)NativePtr)->conditionVariableDeclStmt = (::CppSharp::CppParser::AST::DeclStmt*)value->NativePtr;
}
bool CppSharp::Parser::AST::IfStmt::IsObjCAvailabilityCheck::get() bool CppSharp::Parser::AST::IfStmt::IsObjCAvailabilityCheck::get()
{ {
return ((::CppSharp::CppParser::AST::IfStmt*)NativePtr)->isObjCAvailabilityCheck; return ((::CppSharp::CppParser::AST::IfStmt*)NativePtr)->isObjCAvailabilityCheck;
@ -942,6 +992,16 @@ void CppSharp::Parser::AST::SwitchStmt::HasVarStorage::set(bool value)
((::CppSharp::CppParser::AST::SwitchStmt*)NativePtr)->hasVarStorage = value; ((::CppSharp::CppParser::AST::SwitchStmt*)NativePtr)->hasVarStorage = value;
} }
CppSharp::Parser::AST::DeclStmt^ CppSharp::Parser::AST::SwitchStmt::ConditionVariableDeclStmt::get()
{
return (((::CppSharp::CppParser::AST::SwitchStmt*)NativePtr)->conditionVariableDeclStmt == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::DeclStmt((::CppSharp::CppParser::AST::DeclStmt*)((::CppSharp::CppParser::AST::SwitchStmt*)NativePtr)->conditionVariableDeclStmt);
}
void CppSharp::Parser::AST::SwitchStmt::ConditionVariableDeclStmt::set(CppSharp::Parser::AST::DeclStmt^ value)
{
((::CppSharp::CppParser::AST::SwitchStmt*)NativePtr)->conditionVariableDeclStmt = (::CppSharp::CppParser::AST::DeclStmt*)value->NativePtr;
}
bool CppSharp::Parser::AST::SwitchStmt::IsAllEnumCasesCovered::get() bool CppSharp::Parser::AST::SwitchStmt::IsAllEnumCasesCovered::get()
{ {
return ((::CppSharp::CppParser::AST::SwitchStmt*)NativePtr)->isAllEnumCasesCovered; return ((::CppSharp::CppParser::AST::SwitchStmt*)NativePtr)->isAllEnumCasesCovered;
@ -1025,6 +1085,16 @@ void CppSharp::Parser::AST::WhileStmt::HasVarStorage::set(bool value)
((::CppSharp::CppParser::AST::WhileStmt*)NativePtr)->hasVarStorage = value; ((::CppSharp::CppParser::AST::WhileStmt*)NativePtr)->hasVarStorage = value;
} }
CppSharp::Parser::AST::DeclStmt^ CppSharp::Parser::AST::WhileStmt::ConditionVariableDeclStmt::get()
{
return (((::CppSharp::CppParser::AST::WhileStmt*)NativePtr)->conditionVariableDeclStmt == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::DeclStmt((::CppSharp::CppParser::AST::DeclStmt*)((::CppSharp::CppParser::AST::WhileStmt*)NativePtr)->conditionVariableDeclStmt);
}
void CppSharp::Parser::AST::WhileStmt::ConditionVariableDeclStmt::set(CppSharp::Parser::AST::DeclStmt^ value)
{
((::CppSharp::CppParser::AST::WhileStmt*)NativePtr)->conditionVariableDeclStmt = (::CppSharp::CppParser::AST::DeclStmt*)value->NativePtr;
}
CppSharp::Parser::AST::DoStmt::DoStmt(::CppSharp::CppParser::AST::DoStmt* native) CppSharp::Parser::AST::DoStmt::DoStmt(::CppSharp::CppParser::AST::DoStmt* native)
: CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)native) : CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)native)
{ {
@ -2362,6 +2432,16 @@ void CppSharp::Parser::AST::CapturedStmt::CaptureInits::set(System::Collections:
((::CppSharp::CppParser::AST::CapturedStmt*)NativePtr)->capture_inits = _tmpvalue; ((::CppSharp::CppParser::AST::CapturedStmt*)NativePtr)->capture_inits = _tmpvalue;
} }
CppSharp::Parser::AST::Stmt^ CppSharp::Parser::AST::CapturedStmt::capturedStmt::get()
{
return (((::CppSharp::CppParser::AST::CapturedStmt*)NativePtr)->capturedStmt == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::Stmt((::CppSharp::CppParser::AST::Stmt*)((::CppSharp::CppParser::AST::CapturedStmt*)NativePtr)->capturedStmt);
}
void CppSharp::Parser::AST::CapturedStmt::capturedStmt::set(CppSharp::Parser::AST::Stmt^ value)
{
((::CppSharp::CppParser::AST::CapturedStmt*)NativePtr)->capturedStmt = (::CppSharp::CppParser::AST::Stmt*)value->NativePtr;
}
unsigned int CppSharp::Parser::AST::CapturedStmt::CaptureSize::get() unsigned int CppSharp::Parser::AST::CapturedStmt::CaptureSize::get()
{ {
return ((::CppSharp::CppParser::AST::CapturedStmt*)NativePtr)->capture_size; return ((::CppSharp::CppParser::AST::CapturedStmt*)NativePtr)->capture_size;
@ -2484,6 +2564,16 @@ void CppSharp::Parser::AST::CXXTryStmt::TryLoc::set(CppSharp::Parser::SourceLoca
((::CppSharp::CppParser::AST::CXXTryStmt*)NativePtr)->tryLoc = _marshal0; ((::CppSharp::CppParser::AST::CXXTryStmt*)NativePtr)->tryLoc = _marshal0;
} }
CppSharp::Parser::AST::CompoundStmt^ CppSharp::Parser::AST::CXXTryStmt::TryBlock::get()
{
return (((::CppSharp::CppParser::AST::CXXTryStmt*)NativePtr)->tryBlock == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::CompoundStmt((::CppSharp::CppParser::AST::CompoundStmt*)((::CppSharp::CppParser::AST::CXXTryStmt*)NativePtr)->tryBlock);
}
void CppSharp::Parser::AST::CXXTryStmt::TryBlock::set(CppSharp::Parser::AST::CompoundStmt^ value)
{
((::CppSharp::CppParser::AST::CXXTryStmt*)NativePtr)->tryBlock = (::CppSharp::CppParser::AST::CompoundStmt*)value->NativePtr;
}
unsigned int CppSharp::Parser::AST::CXXTryStmt::NumHandlers::get() unsigned int CppSharp::Parser::AST::CXXTryStmt::NumHandlers::get()
{ {
return ((::CppSharp::CppParser::AST::CXXTryStmt*)NativePtr)->numHandlers; return ((::CppSharp::CppParser::AST::CXXTryStmt*)NativePtr)->numHandlers;
@ -2575,6 +2665,46 @@ void CppSharp::Parser::AST::CXXForRangeStmt::Body::set(CppSharp::Parser::AST::St
((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->body = (::CppSharp::CppParser::AST::Stmt*)value->NativePtr; ((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->body = (::CppSharp::CppParser::AST::Stmt*)value->NativePtr;
} }
CppSharp::Parser::AST::DeclStmt^ CppSharp::Parser::AST::CXXForRangeStmt::RangeStmt::get()
{
return (((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->rangeStmt == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::DeclStmt((::CppSharp::CppParser::AST::DeclStmt*)((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->rangeStmt);
}
void CppSharp::Parser::AST::CXXForRangeStmt::RangeStmt::set(CppSharp::Parser::AST::DeclStmt^ value)
{
((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->rangeStmt = (::CppSharp::CppParser::AST::DeclStmt*)value->NativePtr;
}
CppSharp::Parser::AST::DeclStmt^ CppSharp::Parser::AST::CXXForRangeStmt::BeginStmt::get()
{
return (((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->beginStmt == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::DeclStmt((::CppSharp::CppParser::AST::DeclStmt*)((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->beginStmt);
}
void CppSharp::Parser::AST::CXXForRangeStmt::BeginStmt::set(CppSharp::Parser::AST::DeclStmt^ value)
{
((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->beginStmt = (::CppSharp::CppParser::AST::DeclStmt*)value->NativePtr;
}
CppSharp::Parser::AST::DeclStmt^ CppSharp::Parser::AST::CXXForRangeStmt::EndStmt::get()
{
return (((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->endStmt == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::DeclStmt((::CppSharp::CppParser::AST::DeclStmt*)((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->endStmt);
}
void CppSharp::Parser::AST::CXXForRangeStmt::EndStmt::set(CppSharp::Parser::AST::DeclStmt^ value)
{
((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->endStmt = (::CppSharp::CppParser::AST::DeclStmt*)value->NativePtr;
}
CppSharp::Parser::AST::DeclStmt^ CppSharp::Parser::AST::CXXForRangeStmt::LoopVarStmt::get()
{
return (((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->loopVarStmt == nullptr) ? nullptr : gcnew CppSharp::Parser::AST::DeclStmt((::CppSharp::CppParser::AST::DeclStmt*)((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->loopVarStmt);
}
void CppSharp::Parser::AST::CXXForRangeStmt::LoopVarStmt::set(CppSharp::Parser::AST::DeclStmt^ value)
{
((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->loopVarStmt = (::CppSharp::CppParser::AST::DeclStmt*)value->NativePtr;
}
CppSharp::Parser::SourceLocation CppSharp::Parser::AST::CXXForRangeStmt::ForLoc::get() CppSharp::Parser::SourceLocation CppSharp::Parser::AST::CXXForRangeStmt::ForLoc::get()
{ {
return CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->forLoc); return CppSharp::Parser::SourceLocation((::CppSharp::CppParser::SourceLocation*)&((::CppSharp::CppParser::AST::CXXForRangeStmt*)NativePtr)->forLoc);

102
src/CppParser/Bindings/CLI/Stmt.h

@ -233,6 +233,12 @@ namespace CppSharp
void set(CppSharp::Parser::SourceLocation); 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); static operator CppSharp::Parser::AST::Stmt^(CppSharp::Parser::AST::StmtClass klass);
protected: protected:
@ -263,6 +269,12 @@ namespace CppSharp
void set(bool); void set(bool);
} }
property CppSharp::Parser::AST::Declaration^ SingleDecl
{
CppSharp::Parser::AST::Declaration^ get();
void set(CppSharp::Parser::AST::Declaration^);
}
property unsigned int GetdeclsCount property unsigned int GetdeclsCount
{ {
unsigned int get(); unsigned int get();
@ -330,6 +342,18 @@ namespace CppSharp
void set(unsigned int); void set(unsigned int);
} }
property CppSharp::Parser::AST::Stmt^ BodyFront
{
CppSharp::Parser::AST::Stmt^ get();
void set(CppSharp::Parser::AST::Stmt^);
}
property CppSharp::Parser::AST::Stmt^ BodyBack
{
CppSharp::Parser::AST::Stmt^ get();
void set(CppSharp::Parser::AST::Stmt^);
}
property CppSharp::Parser::SourceLocation LBracLoc property CppSharp::Parser::SourceLocation LBracLoc
{ {
CppSharp::Parser::SourceLocation get(); CppSharp::Parser::SourceLocation get();
@ -380,6 +404,12 @@ namespace CppSharp
void set(CppSharp::Parser::SourceLocation); void set(CppSharp::Parser::SourceLocation);
} }
property CppSharp::Parser::AST::Stmt^ SubStmt
{
CppSharp::Parser::AST::Stmt^ get();
void set(CppSharp::Parser::AST::Stmt^);
}
static operator CppSharp::Parser::AST::SwitchCase^(CppSharp::Parser::AST::StmtClass klass); static operator CppSharp::Parser::AST::SwitchCase^(CppSharp::Parser::AST::StmtClass klass);
}; };
@ -419,12 +449,6 @@ namespace CppSharp
void set(CppSharp::Parser::AST::Expr^); void set(CppSharp::Parser::AST::Expr^);
} }
property CppSharp::Parser::AST::Stmt^ SubStmt
{
CppSharp::Parser::AST::Stmt^ get();
void set(CppSharp::Parser::AST::Stmt^);
}
property bool CaseStmtIsGNURange property bool CaseStmtIsGNURange
{ {
bool get(); bool get();
@ -444,12 +468,6 @@ namespace CppSharp
~DefaultStmt(); ~DefaultStmt();
property CppSharp::Parser::AST::Stmt^ SubStmt
{
CppSharp::Parser::AST::Stmt^ get();
void set(CppSharp::Parser::AST::Stmt^);
}
property CppSharp::Parser::SourceLocation DefaultLoc property CppSharp::Parser::SourceLocation DefaultLoc
{ {
CppSharp::Parser::SourceLocation get(); CppSharp::Parser::SourceLocation get();
@ -505,6 +523,12 @@ namespace CppSharp
CppSharp::Parser::SourceLocation get(); CppSharp::Parser::SourceLocation get();
void set(CppSharp::Parser::SourceLocation); void set(CppSharp::Parser::SourceLocation);
} }
property CppSharp::Parser::AST::Stmt^ SubStmt
{
CppSharp::Parser::AST::Stmt^ get();
void set(CppSharp::Parser::AST::Stmt^);
}
}; };
public ref class IfStmt : CppSharp::Parser::AST::Stmt public ref class IfStmt : CppSharp::Parser::AST::Stmt
@ -579,6 +603,12 @@ namespace CppSharp
void set(bool); void set(bool);
} }
property CppSharp::Parser::AST::DeclStmt^ ConditionVariableDeclStmt
{
CppSharp::Parser::AST::DeclStmt^ get();
void set(CppSharp::Parser::AST::DeclStmt^);
}
property bool IsObjCAvailabilityCheck property bool IsObjCAvailabilityCheck
{ {
bool get(); bool get();
@ -634,6 +664,12 @@ namespace CppSharp
void set(bool); void set(bool);
} }
property CppSharp::Parser::AST::DeclStmt^ ConditionVariableDeclStmt
{
CppSharp::Parser::AST::DeclStmt^ get();
void set(CppSharp::Parser::AST::DeclStmt^);
}
property bool IsAllEnumCasesCovered property bool IsAllEnumCasesCovered
{ {
bool get(); bool get();
@ -676,6 +712,12 @@ namespace CppSharp
bool get(); bool get();
void set(bool); void set(bool);
} }
property CppSharp::Parser::AST::DeclStmt^ ConditionVariableDeclStmt
{
CppSharp::Parser::AST::DeclStmt^ get();
void set(CppSharp::Parser::AST::DeclStmt^);
}
}; };
public ref class DoStmt : CppSharp::Parser::AST::Stmt public ref class DoStmt : CppSharp::Parser::AST::Stmt
@ -1318,6 +1360,12 @@ namespace CppSharp
void set(System::Collections::Generic::List<CppSharp::Parser::AST::Expr^>^); void set(System::Collections::Generic::List<CppSharp::Parser::AST::Expr^>^);
} }
property CppSharp::Parser::AST::Stmt^ capturedStmt
{
CppSharp::Parser::AST::Stmt^ get();
void set(CppSharp::Parser::AST::Stmt^);
}
property unsigned int CaptureSize property unsigned int CaptureSize
{ {
unsigned int get(); unsigned int get();
@ -1385,6 +1433,12 @@ namespace CppSharp
void set(CppSharp::Parser::SourceLocation); void set(CppSharp::Parser::SourceLocation);
} }
property CppSharp::Parser::AST::CompoundStmt^ TryBlock
{
CppSharp::Parser::AST::CompoundStmt^ get();
void set(CppSharp::Parser::AST::CompoundStmt^);
}
property unsigned int NumHandlers property unsigned int NumHandlers
{ {
unsigned int get(); unsigned int get();
@ -1434,6 +1488,30 @@ namespace CppSharp
void set(CppSharp::Parser::AST::Stmt^); void set(CppSharp::Parser::AST::Stmt^);
} }
property CppSharp::Parser::AST::DeclStmt^ RangeStmt
{
CppSharp::Parser::AST::DeclStmt^ get();
void set(CppSharp::Parser::AST::DeclStmt^);
}
property CppSharp::Parser::AST::DeclStmt^ BeginStmt
{
CppSharp::Parser::AST::DeclStmt^ get();
void set(CppSharp::Parser::AST::DeclStmt^);
}
property CppSharp::Parser::AST::DeclStmt^ EndStmt
{
CppSharp::Parser::AST::DeclStmt^ get();
void set(CppSharp::Parser::AST::DeclStmt^);
}
property CppSharp::Parser::AST::DeclStmt^ LoopVarStmt
{
CppSharp::Parser::AST::DeclStmt^ get();
void set(CppSharp::Parser::AST::DeclStmt^);
}
property CppSharp::Parser::SourceLocation ForLoc property CppSharp::Parser::SourceLocation ForLoc
{ {
CppSharp::Parser::SourceLocation get(); CppSharp::Parser::SourceLocation get();

6427
src/CppParser/Bindings/CSharp/i686-apple-darwin12.4.0/CppSharp.CppParser.cs

File diff suppressed because it is too large Load Diff

6453
src/CppParser/Bindings/CSharp/i686-pc-win32-msvc/CppSharp.CppParser.cs

File diff suppressed because it is too large Load Diff

6433
src/CppParser/Bindings/CSharp/x86_64-apple-darwin12.4.0/CppSharp.CppParser.cs

File diff suppressed because it is too large Load Diff

6427
src/CppParser/Bindings/CSharp/x86_64-linux-gnu-cxx11abi/CppSharp.CppParser.cs

File diff suppressed because it is too large Load Diff

6405
src/CppParser/Bindings/CSharp/x86_64-linux-gnu/CppSharp.CppParser.cs

File diff suppressed because it is too large Load Diff

6457
src/CppParser/Bindings/CSharp/x86_64-pc-win32-msvc/CppSharp.CppParser.cs

File diff suppressed because it is too large Load Diff

14
src/CppParser/Bootstrap/Bootstrap.cs

@ -719,7 +719,7 @@ namespace CppSharp
property.Visit(this); property.Visit(this);
} }
foreach (var method in @class.Methods.Where(m => m.IsGenerated)) foreach (var method in @class.Methods)
{ {
if (SkipMethod(method)) if (SkipMethod(method))
continue; continue;
@ -1564,12 +1564,19 @@ namespace CppSharp
if (typeName.Contains("ArrayRef")) if (typeName.Contains("ArrayRef"))
return true; return true;
// AtomicExpr
if (typeName.Contains("unique_ptr<AtomicScopeModel, default_delete<AtomicScopeModel>>"))
return true;
if (typeName.Contains("Expr**"))
return true;
return false; return false;
} }
public static bool SkipMethod(Method method) public static bool SkipMethod(Method method)
{ {
if (!method.IsGenerated) if (method.Ignore)
return true; return true;
var @class = method.Namespace as Class; var @class = method.Namespace as Class;
@ -1653,6 +1660,7 @@ namespace CppSharp
case "identKind": case "identKind":
case "literalOperatorKind": case "literalOperatorKind":
case "initializationStyle": case "initializationStyle":
case "capturedStmt":
hasConflict = true; hasConflict = true;
break; break;
} }
@ -1711,6 +1719,8 @@ namespace CppSharp
className = "Method"; className = "Method";
else if (typeName.Contains("FunctionDecl")) else if (typeName.Contains("FunctionDecl"))
className = "Function"; className = "Function";
else if (typeName == "Decl" || typeName == "Decl*")
className = "Declaration";
if (className != null) if (className != null)
return (typePrinter is CppTypePrinter) ? return (typePrinter is CppTypePrinter) ?

68
src/CppParser/Expr.cpp

@ -28,6 +28,9 @@ Expr::Expr()
, isXValue(0) , isXValue(0)
, isGLValue(0) , isGLValue(0)
, isOrdinaryOrBitFieldObject(0) , isOrdinaryOrBitFieldObject(0)
, sourceBitField(nullptr)
, referencedDeclOfCallee(nullptr)
, hasPlaceholderType(0)
{ {
} }
@ -44,6 +47,9 @@ Expr::Expr(StmtClass klass)
, isXValue(0) , isXValue(0)
, isGLValue(0) , isGLValue(0)
, isOrdinaryOrBitFieldObject(0) , isOrdinaryOrBitFieldObject(0)
, sourceBitField(nullptr)
, referencedDeclOfCallee(nullptr)
, hasPlaceholderType(0)
{ {
} }
@ -77,6 +83,7 @@ DeclRefExpr::DeclRefExpr()
, location(SourceLocation()) , location(SourceLocation())
, hadMultipleCandidates(0) , hadMultipleCandidates(0)
, hasQualifier(0) , hasQualifier(0)
, foundDecl(nullptr)
, hasTemplateKWAndArgsInfo(0) , hasTemplateKWAndArgsInfo(0)
, templateKeywordLoc(SourceLocation()) , templateKeywordLoc(SourceLocation())
, lAngleLoc(SourceLocation()) , lAngleLoc(SourceLocation())
@ -163,6 +170,12 @@ UnaryOperator::UnaryOperator()
, subExpr(nullptr) , subExpr(nullptr)
, operatorLoc(SourceLocation()) , operatorLoc(SourceLocation())
, canOverflow(0) , canOverflow(0)
, isPrefix(0)
, isPostfix(0)
, isIncrementOp(0)
, isDecrementOp(0)
, isIncrementDecrementOp(0)
, isArithmeticOp(0)
{ {
} }
@ -182,6 +195,7 @@ UnaryExprOrTypeTraitExpr::UnaryExprOrTypeTraitExpr()
, rParenLoc(SourceLocation()) , rParenLoc(SourceLocation())
, isArgumentType(0) , isArgumentType(0)
, argumentType(QualifiedType()) , argumentType(QualifiedType())
, argumentExpr(nullptr)
, typeOfArgument(QualifiedType()) , typeOfArgument(QualifiedType())
{ {
} }
@ -191,6 +205,8 @@ ArraySubscriptExpr::ArraySubscriptExpr()
, lHS(nullptr) , lHS(nullptr)
, rHS(nullptr) , rHS(nullptr)
, rBracketLoc(SourceLocation()) , rBracketLoc(SourceLocation())
, base(nullptr)
, idx(nullptr)
{ {
} }
@ -198,6 +214,8 @@ CallExpr::CallExpr()
: Expr(StmtClass::CallExpr) : Expr(StmtClass::CallExpr)
, callee(nullptr) , callee(nullptr)
, rParenLoc(SourceLocation()) , rParenLoc(SourceLocation())
, calleeDecl(nullptr)
, directCallee(nullptr)
, numArgs(0) , numArgs(0)
, numCommas(0) , numCommas(0)
, builtinCallee(0) , builtinCallee(0)
@ -209,6 +227,8 @@ CallExpr::CallExpr(StmtClass klass)
: Expr(klass) : Expr(klass)
, callee(nullptr) , callee(nullptr)
, rParenLoc(SourceLocation()) , rParenLoc(SourceLocation())
, calleeDecl(nullptr)
, directCallee(nullptr)
, numArgs(0) , numArgs(0)
, numCommas(0) , numCommas(0)
, builtinCallee(0) , builtinCallee(0)
@ -248,6 +268,8 @@ CastExpr::CastExpr()
: Expr(StmtClass::NoStmt) : Expr(StmtClass::NoStmt)
, castKind((CastKind::Dependent)) , castKind((CastKind::Dependent))
, subExpr(nullptr) , subExpr(nullptr)
, castKindName(nullptr)
, subExprAsWritten(nullptr)
, conversionFunction(nullptr) , conversionFunction(nullptr)
, path_empty(0) , path_empty(0)
, path_size(0) , path_size(0)
@ -258,6 +280,8 @@ CastExpr::CastExpr(StmtClass klass)
: Expr(klass) : Expr(klass)
, castKind((CastKind::Dependent)) , castKind((CastKind::Dependent))
, subExpr(nullptr) , subExpr(nullptr)
, castKindName(nullptr)
, subExprAsWritten(nullptr)
, conversionFunction(nullptr) , conversionFunction(nullptr)
, path_empty(0) , path_empty(0)
, path_size(0) , path_size(0)
@ -295,6 +319,18 @@ BinaryOperator::BinaryOperator()
, opcode((BinaryOperatorKind::PtrMemD)) , opcode((BinaryOperatorKind::PtrMemD))
, lHS(nullptr) , lHS(nullptr)
, rHS(nullptr) , rHS(nullptr)
, isPtrMemOp(0)
, isMultiplicativeOp(0)
, isAdditiveOp(0)
, isShiftOp(0)
, isBitwiseOp(0)
, isRelationalOp(0)
, isEqualityOp(0)
, isComparisonOp(0)
, isLogicalOp(0)
, isAssignmentOp(0)
, isCompoundAssignmentOp(0)
, isShiftAssignOp(0)
, isFPContractableWithinStatement(0) , isFPContractableWithinStatement(0)
, isFEnvAccessOn(0) , isFEnvAccessOn(0)
{ {
@ -306,6 +342,18 @@ BinaryOperator::BinaryOperator(StmtClass klass)
, opcode((BinaryOperatorKind::PtrMemD)) , opcode((BinaryOperatorKind::PtrMemD))
, lHS(nullptr) , lHS(nullptr)
, rHS(nullptr) , rHS(nullptr)
, isPtrMemOp(0)
, isMultiplicativeOp(0)
, isAdditiveOp(0)
, isShiftOp(0)
, isBitwiseOp(0)
, isRelationalOp(0)
, isEqualityOp(0)
, isComparisonOp(0)
, isLogicalOp(0)
, isAssignmentOp(0)
, isCompoundAssignmentOp(0)
, isShiftAssignOp(0)
, isFPContractableWithinStatement(0) , isFPContractableWithinStatement(0)
, isFEnvAccessOn(0) , isFEnvAccessOn(0)
{ {
@ -494,8 +542,10 @@ GenericSelectionExpr::GenericSelectionExpr()
, genericLoc(SourceLocation()) , genericLoc(SourceLocation())
, defaultLoc(SourceLocation()) , defaultLoc(SourceLocation())
, rParenLoc(SourceLocation()) , rParenLoc(SourceLocation())
, controllingExpr(nullptr)
, isResultDependent(0) , isResultDependent(0)
, resultIndex(0) , resultIndex(0)
, resultExpr(nullptr)
{ {
} }
@ -512,6 +562,7 @@ ExtVectorElementExpr::ExtVectorElementExpr()
BlockExpr::BlockExpr() BlockExpr::BlockExpr()
: Expr(StmtClass::BlockExpr) : Expr(StmtClass::BlockExpr)
, caretLocation(SourceLocation()) , caretLocation(SourceLocation())
, body(nullptr)
{ {
} }
@ -525,7 +576,9 @@ AsTypeExpr::AsTypeExpr()
PseudoObjectExpr::PseudoObjectExpr() PseudoObjectExpr::PseudoObjectExpr()
: Expr(StmtClass::PseudoObjectExpr) : Expr(StmtClass::PseudoObjectExpr)
, syntacticForm(nullptr)
, resultExprIndex(0) , resultExprIndex(0)
, resultExpr(nullptr)
, numSemanticExprs(0) , numSemanticExprs(0)
{ {
} }
@ -541,6 +594,7 @@ AtomicExpr::AtomicExpr()
, weak(nullptr) , weak(nullptr)
, valueType(QualifiedType()) , valueType(QualifiedType())
, op((AtomicExpr::AtomicOp::C11AtomicInit)) , op((AtomicExpr::AtomicOp::C11AtomicInit))
, numSubExprs(0)
, isVolatile(0) , isVolatile(0)
, isCmpXChg(0) , isCmpXChg(0)
, isOpenCL(0) , isOpenCL(0)
@ -557,6 +611,7 @@ TypoExpr::TypoExpr()
CXXOperatorCallExpr::CXXOperatorCallExpr() CXXOperatorCallExpr::CXXOperatorCallExpr()
: CallExpr(StmtClass::CXXOperatorCallExpr) : CallExpr(StmtClass::CXXOperatorCallExpr)
, _operator((OverloadedOperatorKind::None)) , _operator((OverloadedOperatorKind::None))
, isAssignmentOp(0)
, isInfixBinaryOp(0) , isInfixBinaryOp(0)
, operatorLoc(SourceLocation()) , operatorLoc(SourceLocation())
, isFPContractableWithinStatement(0) , isFPContractableWithinStatement(0)
@ -618,6 +673,7 @@ CXXConstCastExpr::CXXConstCastExpr()
UserDefinedLiteral::UserDefinedLiteral() UserDefinedLiteral::UserDefinedLiteral()
: CallExpr(StmtClass::UserDefinedLiteral) : CallExpr(StmtClass::UserDefinedLiteral)
, literalOperatorKind((UserDefinedLiteral::LiteralOperatorKind::Raw)) , literalOperatorKind((UserDefinedLiteral::LiteralOperatorKind::Raw))
, cookedLiteral(nullptr)
, uDSuffixLoc(SourceLocation()) , uDSuffixLoc(SourceLocation())
{ {
} }
@ -637,6 +693,7 @@ CXXNullPtrLiteralExpr::CXXNullPtrLiteralExpr()
CXXStdInitializerListExpr::CXXStdInitializerListExpr() CXXStdInitializerListExpr::CXXStdInitializerListExpr()
: Expr(StmtClass::CXXStdInitializerListExpr) : Expr(StmtClass::CXXStdInitializerListExpr)
, subExpr(nullptr)
{ {
} }
@ -660,6 +717,8 @@ MSPropertyRefExpr::MSPropertyRefExpr()
MSPropertySubscriptExpr::MSPropertySubscriptExpr() MSPropertySubscriptExpr::MSPropertySubscriptExpr()
: Expr(StmtClass::MSPropertySubscriptExpr) : Expr(StmtClass::MSPropertySubscriptExpr)
, rBracketLoc(SourceLocation()) , rBracketLoc(SourceLocation())
, base(nullptr)
, idx(nullptr)
{ {
} }
@ -679,6 +738,7 @@ CXXThisExpr::CXXThisExpr()
CXXThrowExpr::CXXThrowExpr() CXXThrowExpr::CXXThrowExpr()
: Expr(StmtClass::CXXThrowExpr) : Expr(StmtClass::CXXThrowExpr)
, subExpr(nullptr)
, throwLoc(SourceLocation()) , throwLoc(SourceLocation())
, isThrownVariableInScope(0) , isThrownVariableInScope(0)
{ {
@ -686,12 +746,15 @@ CXXThrowExpr::CXXThrowExpr()
CXXDefaultArgExpr::CXXDefaultArgExpr() CXXDefaultArgExpr::CXXDefaultArgExpr()
: Expr(StmtClass::CXXDefaultArgExpr) : Expr(StmtClass::CXXDefaultArgExpr)
, expr(nullptr)
, usedLocation(SourceLocation()) , usedLocation(SourceLocation())
{ {
} }
CXXDefaultInitExpr::CXXDefaultInitExpr() CXXDefaultInitExpr::CXXDefaultInitExpr()
: Expr(StmtClass::CXXDefaultInitExpr) : Expr(StmtClass::CXXDefaultInitExpr)
, field(nullptr)
, expr(nullptr)
{ {
} }
@ -778,12 +841,14 @@ CXXNewExpr::CXXNewExpr()
, operatorDelete(nullptr) , operatorDelete(nullptr)
, allocatedType(QualifiedType()) , allocatedType(QualifiedType())
, isArray(0) , isArray(0)
, arraySize(nullptr)
, numPlacementArgs(0) , numPlacementArgs(0)
, isParenTypeId(0) , isParenTypeId(0)
, typeIdParens(SourceRange()) , typeIdParens(SourceRange())
, isGlobalNew(0) , isGlobalNew(0)
, hasInitializer(0) , hasInitializer(0)
, initializationStyle((CXXNewExpr::InitializationStyle::NoInit)) , initializationStyle((CXXNewExpr::InitializationStyle::NoInit))
, initializer(nullptr)
, constructExpr(nullptr) , constructExpr(nullptr)
, directInitRange(SourceRange()) , directInitRange(SourceRange())
{ {
@ -797,6 +862,7 @@ CXXDeleteExpr::CXXDeleteExpr()
, isArrayForm(0) , isArrayForm(0)
, isArrayFormAsWritten(0) , isArrayFormAsWritten(0)
, operatorDelete(nullptr) , operatorDelete(nullptr)
, argument(nullptr)
, destroyedType(QualifiedType()) , destroyedType(QualifiedType())
{ {
} }
@ -925,6 +991,7 @@ CXXDependentScopeMemberExpr::CXXDependentScopeMemberExpr()
UnresolvedMemberExpr::UnresolvedMemberExpr() UnresolvedMemberExpr::UnresolvedMemberExpr()
: OverloadExpr(StmtClass::UnresolvedMemberExpr) : OverloadExpr(StmtClass::UnresolvedMemberExpr)
, isImplicitAccess(0) , isImplicitAccess(0)
, base(nullptr)
, baseType(QualifiedType()) , baseType(QualifiedType())
, hasUnresolvedUsing(0) , hasUnresolvedUsing(0)
, isArrow(0) , isArrow(0)
@ -942,6 +1009,7 @@ CXXNoexceptExpr::CXXNoexceptExpr()
PackExpansionExpr::PackExpansionExpr() PackExpansionExpr::PackExpansionExpr()
: Expr(StmtClass::PackExpansionExpr) : Expr(StmtClass::PackExpansionExpr)
, pattern(nullptr)
, ellipsisLoc(SourceLocation()) , ellipsisLoc(SourceLocation())
{ {
} }

50
src/CppParser/Expr.h

@ -329,6 +329,9 @@ public:
bool isXValue; bool isXValue;
bool isGLValue; bool isGLValue;
bool isOrdinaryOrBitFieldObject; bool isOrdinaryOrBitFieldObject;
Field* sourceBitField;
Declaration* referencedDeclOfCallee;
bool hasPlaceholderType;
}; };
class CS_API FullExpr : public Expr class CS_API FullExpr : public Expr
@ -361,6 +364,7 @@ public:
SourceLocation location; SourceLocation location;
bool hadMultipleCandidates; bool hadMultipleCandidates;
bool hasQualifier; bool hasQualifier;
Declaration* foundDecl;
bool hasTemplateKWAndArgsInfo; bool hasTemplateKWAndArgsInfo;
SourceLocation templateKeywordLoc; SourceLocation templateKeywordLoc;
SourceLocation lAngleLoc; SourceLocation lAngleLoc;
@ -488,6 +492,12 @@ public:
Expr* subExpr; Expr* subExpr;
SourceLocation operatorLoc; SourceLocation operatorLoc;
bool canOverflow; bool canOverflow;
bool isPrefix;
bool isPostfix;
bool isIncrementOp;
bool isDecrementOp;
bool isIncrementDecrementOp;
bool isArithmeticOp;
}; };
class CS_API OffsetOfExpr : public Expr class CS_API OffsetOfExpr : public Expr
@ -509,6 +519,7 @@ public:
SourceLocation rParenLoc; SourceLocation rParenLoc;
bool isArgumentType; bool isArgumentType;
QualifiedType argumentType; QualifiedType argumentType;
Expr* argumentExpr;
QualifiedType typeOfArgument; QualifiedType typeOfArgument;
}; };
@ -519,6 +530,8 @@ public:
Expr* lHS; Expr* lHS;
Expr* rHS; Expr* rHS;
SourceLocation rBracketLoc; SourceLocation rBracketLoc;
Expr* base;
Expr* idx;
}; };
class CS_API CallExpr : public Expr class CS_API CallExpr : public Expr
@ -529,6 +542,8 @@ public:
VECTOR(Expr*, arguments) VECTOR(Expr*, arguments)
Expr* callee; Expr* callee;
SourceLocation rParenLoc; SourceLocation rParenLoc;
Declaration* calleeDecl;
Function* directCallee;
unsigned int numArgs; unsigned int numArgs;
unsigned int numCommas; unsigned int numCommas;
unsigned int builtinCallee; unsigned int builtinCallee;
@ -570,6 +585,8 @@ public:
CastExpr(StmtClass klass); CastExpr(StmtClass klass);
CastKind castKind; CastKind castKind;
Expr* subExpr; Expr* subExpr;
const char* castKindName;
Expr* subExprAsWritten;
Declaration* conversionFunction; Declaration* conversionFunction;
bool path_empty; bool path_empty;
unsigned int path_size; unsigned int path_size;
@ -612,6 +629,19 @@ public:
BinaryOperatorKind opcode; BinaryOperatorKind opcode;
Expr* lHS; Expr* lHS;
Expr* rHS; Expr* rHS;
std::string opcodeStr;
bool isPtrMemOp;
bool isMultiplicativeOp;
bool isAdditiveOp;
bool isShiftOp;
bool isBitwiseOp;
bool isRelationalOp;
bool isEqualityOp;
bool isComparisonOp;
bool isLogicalOp;
bool isAssignmentOp;
bool isCompoundAssignmentOp;
bool isShiftAssignOp;
bool isFPContractableWithinStatement; bool isFPContractableWithinStatement;
bool isFEnvAccessOn; bool isFEnvAccessOn;
}; };
@ -828,8 +858,10 @@ public:
SourceLocation genericLoc; SourceLocation genericLoc;
SourceLocation defaultLoc; SourceLocation defaultLoc;
SourceLocation rParenLoc; SourceLocation rParenLoc;
Expr* controllingExpr;
bool isResultDependent; bool isResultDependent;
unsigned int resultIndex; unsigned int resultIndex;
Expr* resultExpr;
}; };
class CS_API ExtVectorElementExpr : public Expr class CS_API ExtVectorElementExpr : public Expr
@ -848,6 +880,7 @@ class CS_API BlockExpr : public Expr
public: public:
BlockExpr(); BlockExpr();
SourceLocation caretLocation; SourceLocation caretLocation;
Stmt* body;
}; };
class CS_API AsTypeExpr : public Expr class CS_API AsTypeExpr : public Expr
@ -863,7 +896,9 @@ class CS_API PseudoObjectExpr : public Expr
{ {
public: public:
PseudoObjectExpr(); PseudoObjectExpr();
Expr* syntacticForm;
unsigned int resultExprIndex; unsigned int resultExprIndex;
Expr* resultExpr;
unsigned int numSemanticExprs; unsigned int numSemanticExprs;
}; };
@ -931,6 +966,7 @@ public:
Expr* weak; Expr* weak;
QualifiedType valueType; QualifiedType valueType;
AtomicOp op; AtomicOp op;
unsigned int numSubExprs;
bool isVolatile; bool isVolatile;
bool isCmpXChg; bool isCmpXChg;
bool isOpenCL; bool isOpenCL;
@ -949,6 +985,7 @@ class CS_API CXXOperatorCallExpr : public CallExpr
public: public:
CXXOperatorCallExpr(); CXXOperatorCallExpr();
OverloadedOperatorKind _operator; OverloadedOperatorKind _operator;
bool isAssignmentOp;
bool isInfixBinaryOp; bool isInfixBinaryOp;
SourceLocation operatorLoc; SourceLocation operatorLoc;
bool isFPContractableWithinStatement; bool isFPContractableWithinStatement;
@ -1020,6 +1057,7 @@ public:
UserDefinedLiteral(); UserDefinedLiteral();
LiteralOperatorKind literalOperatorKind; LiteralOperatorKind literalOperatorKind;
Expr* cookedLiteral;
SourceLocation uDSuffixLoc; SourceLocation uDSuffixLoc;
}; };
@ -1042,6 +1080,7 @@ class CS_API CXXStdInitializerListExpr : public Expr
{ {
public: public:
CXXStdInitializerListExpr(); CXXStdInitializerListExpr();
Expr* subExpr;
}; };
class CS_API CXXTypeidExpr : public Expr class CS_API CXXTypeidExpr : public Expr
@ -1068,6 +1107,8 @@ class CS_API MSPropertySubscriptExpr : public Expr
public: public:
MSPropertySubscriptExpr(); MSPropertySubscriptExpr();
SourceLocation rBracketLoc; SourceLocation rBracketLoc;
Expr* base;
Expr* idx;
}; };
class CS_API CXXUuidofExpr : public Expr class CS_API CXXUuidofExpr : public Expr
@ -1091,6 +1132,7 @@ class CS_API CXXThrowExpr : public Expr
{ {
public: public:
CXXThrowExpr(); CXXThrowExpr();
Expr* subExpr;
SourceLocation throwLoc; SourceLocation throwLoc;
bool isThrownVariableInScope; bool isThrownVariableInScope;
}; };
@ -1099,6 +1141,7 @@ class CS_API CXXDefaultArgExpr : public Expr
{ {
public: public:
CXXDefaultArgExpr(); CXXDefaultArgExpr();
Expr* expr;
SourceLocation usedLocation; SourceLocation usedLocation;
}; };
@ -1106,6 +1149,8 @@ class CS_API CXXDefaultInitExpr : public Expr
{ {
public: public:
CXXDefaultInitExpr(); CXXDefaultInitExpr();
Field* field;
Expr* expr;
}; };
class CS_API CXXBindTemporaryExpr : public Expr class CS_API CXXBindTemporaryExpr : public Expr
@ -1202,12 +1247,14 @@ public:
Function* operatorDelete; Function* operatorDelete;
QualifiedType allocatedType; QualifiedType allocatedType;
bool isArray; bool isArray;
Expr* arraySize;
unsigned int numPlacementArgs; unsigned int numPlacementArgs;
bool isParenTypeId; bool isParenTypeId;
SourceRange typeIdParens; SourceRange typeIdParens;
bool isGlobalNew; bool isGlobalNew;
bool hasInitializer; bool hasInitializer;
InitializationStyle initializationStyle; InitializationStyle initializationStyle;
Expr* initializer;
CXXConstructExpr* constructExpr; CXXConstructExpr* constructExpr;
SourceRange directInitRange; SourceRange directInitRange;
}; };
@ -1220,6 +1267,7 @@ public:
bool isArrayForm; bool isArrayForm;
bool isArrayFormAsWritten; bool isArrayFormAsWritten;
Function* operatorDelete; Function* operatorDelete;
Expr* argument;
QualifiedType destroyedType; QualifiedType destroyedType;
}; };
@ -1348,6 +1396,7 @@ class CS_API UnresolvedMemberExpr : public OverloadExpr
public: public:
UnresolvedMemberExpr(); UnresolvedMemberExpr();
bool isImplicitAccess; bool isImplicitAccess;
Expr* base;
QualifiedType baseType; QualifiedType baseType;
bool hasUnresolvedUsing; bool hasUnresolvedUsing;
bool isArrow; bool isArrow;
@ -1367,6 +1416,7 @@ class CS_API PackExpansionExpr : public Expr
{ {
public: public:
PackExpansionExpr(); PackExpansionExpr();
Expr* pattern;
SourceLocation ellipsisLoc; SourceLocation ellipsisLoc;
}; };

460
src/CppParser/ParseExpr.cpp

File diff suppressed because it is too large Load Diff

46
src/CppParser/ParseStmt.cpp

@ -26,7 +26,10 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::DeclStmt*>(llvm::cast<clang::DeclStmt>(Stmt)); auto S = const_cast<clang::DeclStmt*>(llvm::cast<clang::DeclStmt>(Stmt));
auto _S = new AST::DeclStmt(); auto _S = new AST::DeclStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->isSingleDecl = S->isSingleDecl(); _S->isSingleDecl = S->isSingleDecl();
if (S->isSingleDecl())
_S->singleDecl = static_cast<AST::Declaration*>(WalkDeclaration(S->getSingleDecl()));
for (auto _E : S->decls()) for (auto _E : S->decls())
{ {
auto _ES = WalkDeclaration(_E); auto _ES = WalkDeclaration(_E);
@ -39,6 +42,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::NullStmt*>(llvm::cast<clang::NullStmt>(Stmt)); auto S = const_cast<clang::NullStmt*>(llvm::cast<clang::NullStmt>(Stmt));
auto _S = new AST::NullStmt(); auto _S = new AST::NullStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->hasLeadingEmptyMacro = S->hasLeadingEmptyMacro(); _S->hasLeadingEmptyMacro = S->hasLeadingEmptyMacro();
_Stmt = _S; _Stmt = _S;
break; break;
@ -47,8 +51,11 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::CompoundStmt*>(llvm::cast<clang::CompoundStmt>(Stmt)); auto S = const_cast<clang::CompoundStmt*>(llvm::cast<clang::CompoundStmt>(Stmt));
auto _S = new AST::CompoundStmt(); auto _S = new AST::CompoundStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->body_empty = S->body_empty(); _S->body_empty = S->body_empty();
_S->size = S->size(); _S->size = S->size();
_S->body_front = static_cast<AST::Stmt*>(WalkStatement(S->body_front()));
_S->body_back = static_cast<AST::Stmt*>(WalkStatement(S->body_back()));
for (auto _E : S->body()) for (auto _E : S->body())
{ {
auto _ES = WalkStatement(_E); auto _ES = WalkStatement(_E);
@ -61,6 +68,8 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::CaseStmt*>(llvm::cast<clang::CaseStmt>(Stmt)); auto S = const_cast<clang::CaseStmt*>(llvm::cast<clang::CaseStmt>(Stmt));
auto _S = new AST::CaseStmt(); 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->lHS = static_cast<AST::Expr*>(WalkExpression(S->getLHS()));
_S->rHS = static_cast<AST::Expr*>(WalkExpression(S->getRHS())); _S->rHS = static_cast<AST::Expr*>(WalkExpression(S->getRHS()));
_S->subStmt = static_cast<AST::Stmt*>(WalkStatement(S->getSubStmt())); _S->subStmt = static_cast<AST::Stmt*>(WalkStatement(S->getSubStmt()));
@ -72,6 +81,8 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::DefaultStmt*>(llvm::cast<clang::DefaultStmt>(Stmt)); auto S = const_cast<clang::DefaultStmt*>(llvm::cast<clang::DefaultStmt>(Stmt));
auto _S = new AST::DefaultStmt(); 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())); _S->subStmt = static_cast<AST::Stmt*>(WalkStatement(S->getSubStmt()));
_Stmt = _S; _Stmt = _S;
break; break;
@ -80,6 +91,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::LabelStmt*>(llvm::cast<clang::LabelStmt>(Stmt)); auto S = const_cast<clang::LabelStmt*>(llvm::cast<clang::LabelStmt>(Stmt));
auto _S = new AST::LabelStmt(); auto _S = new AST::LabelStmt();
_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()));
_S->name = S->getName(); _S->name = S->getName();
_Stmt = _S; _Stmt = _S;
@ -89,6 +101,8 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::AttributedStmt*>(llvm::cast<clang::AttributedStmt>(Stmt)); auto S = const_cast<clang::AttributedStmt*>(llvm::cast<clang::AttributedStmt>(Stmt));
auto _S = new AST::AttributedStmt(); 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; _Stmt = _S;
break; break;
} }
@ -96,6 +110,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::IfStmt*>(llvm::cast<clang::IfStmt>(Stmt)); auto S = const_cast<clang::IfStmt*>(llvm::cast<clang::IfStmt>(Stmt));
auto _S = new AST::IfStmt(); auto _S = new AST::IfStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond())); _S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond()));
_S->then = static_cast<AST::Stmt*>(WalkStatement(S->getThen())); _S->then = static_cast<AST::Stmt*>(WalkStatement(S->getThen()));
_S->_else = static_cast<AST::Stmt*>(WalkStatement(S->getElse())); _S->_else = static_cast<AST::Stmt*>(WalkStatement(S->getElse()));
@ -104,6 +119,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
_S->hasInitStorage = S->hasInitStorage(); _S->hasInitStorage = S->hasInitStorage();
_S->hasVarStorage = S->hasVarStorage(); _S->hasVarStorage = S->hasVarStorage();
_S->hasElseStorage = S->hasElseStorage(); _S->hasElseStorage = S->hasElseStorage();
_S->conditionVariableDeclStmt = static_cast<AST::DeclStmt*>(WalkStatement(S->getConditionVariableDeclStmt()));
_S->isObjCAvailabilityCheck = S->isObjCAvailabilityCheck(); _S->isObjCAvailabilityCheck = S->isObjCAvailabilityCheck();
_Stmt = _S; _Stmt = _S;
break; break;
@ -112,11 +128,13 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::SwitchStmt*>(llvm::cast<clang::SwitchStmt>(Stmt)); auto S = const_cast<clang::SwitchStmt*>(llvm::cast<clang::SwitchStmt>(Stmt));
auto _S = new AST::SwitchStmt(); auto _S = new AST::SwitchStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond())); _S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond()));
_S->body = static_cast<AST::Stmt*>(WalkStatement(S->getBody())); _S->body = static_cast<AST::Stmt*>(WalkStatement(S->getBody()));
_S->init = static_cast<AST::Stmt*>(WalkStatement(S->getInit())); _S->init = static_cast<AST::Stmt*>(WalkStatement(S->getInit()));
_S->hasInitStorage = S->hasInitStorage(); _S->hasInitStorage = S->hasInitStorage();
_S->hasVarStorage = S->hasVarStorage(); _S->hasVarStorage = S->hasVarStorage();
_S->conditionVariableDeclStmt = static_cast<AST::DeclStmt*>(WalkStatement(S->getConditionVariableDeclStmt()));
_S->isAllEnumCasesCovered = S->isAllEnumCasesCovered(); _S->isAllEnumCasesCovered = S->isAllEnumCasesCovered();
_Stmt = _S; _Stmt = _S;
break; break;
@ -125,9 +143,11 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::WhileStmt*>(llvm::cast<clang::WhileStmt>(Stmt)); auto S = const_cast<clang::WhileStmt*>(llvm::cast<clang::WhileStmt>(Stmt));
auto _S = new AST::WhileStmt(); auto _S = new AST::WhileStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond())); _S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond()));
_S->body = static_cast<AST::Stmt*>(WalkStatement(S->getBody())); _S->body = static_cast<AST::Stmt*>(WalkStatement(S->getBody()));
_S->hasVarStorage = S->hasVarStorage(); _S->hasVarStorage = S->hasVarStorage();
_S->conditionVariableDeclStmt = static_cast<AST::DeclStmt*>(WalkStatement(S->getConditionVariableDeclStmt()));
_Stmt = _S; _Stmt = _S;
break; break;
} }
@ -135,6 +155,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::DoStmt*>(llvm::cast<clang::DoStmt>(Stmt)); auto S = const_cast<clang::DoStmt*>(llvm::cast<clang::DoStmt>(Stmt));
auto _S = new AST::DoStmt(); auto _S = new AST::DoStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond())); _S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond()));
_S->body = static_cast<AST::Stmt*>(WalkStatement(S->getBody())); _S->body = static_cast<AST::Stmt*>(WalkStatement(S->getBody()));
_Stmt = _S; _Stmt = _S;
@ -144,6 +165,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::ForStmt*>(llvm::cast<clang::ForStmt>(Stmt)); auto S = const_cast<clang::ForStmt*>(llvm::cast<clang::ForStmt>(Stmt));
auto _S = new AST::ForStmt(); auto _S = new AST::ForStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->init = static_cast<AST::Stmt*>(WalkStatement(S->getInit())); _S->init = static_cast<AST::Stmt*>(WalkStatement(S->getInit()));
_S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond())); _S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond()));
_S->inc = static_cast<AST::Expr*>(WalkExpression(S->getInc())); _S->inc = static_cast<AST::Expr*>(WalkExpression(S->getInc()));
@ -156,6 +178,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::GotoStmt*>(llvm::cast<clang::GotoStmt>(Stmt)); auto S = const_cast<clang::GotoStmt*>(llvm::cast<clang::GotoStmt>(Stmt));
auto _S = new AST::GotoStmt(); auto _S = new AST::GotoStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_Stmt = _S; _Stmt = _S;
break; break;
} }
@ -163,6 +186,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::IndirectGotoStmt*>(llvm::cast<clang::IndirectGotoStmt>(Stmt)); auto S = const_cast<clang::IndirectGotoStmt*>(llvm::cast<clang::IndirectGotoStmt>(Stmt));
auto _S = new AST::IndirectGotoStmt(); auto _S = new AST::IndirectGotoStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->target = static_cast<AST::Expr*>(WalkExpression(S->getTarget())); _S->target = static_cast<AST::Expr*>(WalkExpression(S->getTarget()));
_Stmt = _S; _Stmt = _S;
break; break;
@ -171,6 +195,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::ContinueStmt*>(llvm::cast<clang::ContinueStmt>(Stmt)); auto S = const_cast<clang::ContinueStmt*>(llvm::cast<clang::ContinueStmt>(Stmt));
auto _S = new AST::ContinueStmt(); auto _S = new AST::ContinueStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_Stmt = _S; _Stmt = _S;
break; break;
} }
@ -178,6 +203,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::BreakStmt*>(llvm::cast<clang::BreakStmt>(Stmt)); auto S = const_cast<clang::BreakStmt*>(llvm::cast<clang::BreakStmt>(Stmt));
auto _S = new AST::BreakStmt(); auto _S = new AST::BreakStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_Stmt = _S; _Stmt = _S;
break; break;
} }
@ -185,6 +211,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::ReturnStmt*>(llvm::cast<clang::ReturnStmt>(Stmt)); auto S = const_cast<clang::ReturnStmt*>(llvm::cast<clang::ReturnStmt>(Stmt));
auto _S = new AST::ReturnStmt(); auto _S = new AST::ReturnStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->retValue = static_cast<AST::Expr*>(WalkExpression(S->getRetValue())); _S->retValue = static_cast<AST::Expr*>(WalkExpression(S->getRetValue()));
_Stmt = _S; _Stmt = _S;
break; break;
@ -193,6 +220,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::GCCAsmStmt*>(llvm::cast<clang::GCCAsmStmt>(Stmt)); auto S = const_cast<clang::GCCAsmStmt*>(llvm::cast<clang::GCCAsmStmt>(Stmt));
auto _S = new AST::GCCAsmStmt(); auto _S = new AST::GCCAsmStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->simple = S->isSimple(); _S->simple = S->isSimple();
_S->_volatile = S->isVolatile(); _S->_volatile = S->isVolatile();
_S->numOutputs = S->getNumOutputs(); _S->numOutputs = S->getNumOutputs();
@ -216,6 +244,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::MSAsmStmt*>(llvm::cast<clang::MSAsmStmt>(Stmt)); auto S = const_cast<clang::MSAsmStmt*>(llvm::cast<clang::MSAsmStmt>(Stmt));
auto _S = new AST::MSAsmStmt(); auto _S = new AST::MSAsmStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->simple = S->isSimple(); _S->simple = S->isSimple();
_S->_volatile = S->isVolatile(); _S->_volatile = S->isVolatile();
_S->numOutputs = S->getNumOutputs(); _S->numOutputs = S->getNumOutputs();
@ -242,6 +271,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::SEHExceptStmt*>(llvm::cast<clang::SEHExceptStmt>(Stmt)); auto S = const_cast<clang::SEHExceptStmt*>(llvm::cast<clang::SEHExceptStmt>(Stmt));
auto _S = new AST::SEHExceptStmt(); auto _S = new AST::SEHExceptStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->filterExpr = static_cast<AST::Expr*>(WalkExpression(S->getFilterExpr())); _S->filterExpr = static_cast<AST::Expr*>(WalkExpression(S->getFilterExpr()));
_S->block = static_cast<AST::CompoundStmt*>(WalkStatement(S->getBlock())); _S->block = static_cast<AST::CompoundStmt*>(WalkStatement(S->getBlock()));
_Stmt = _S; _Stmt = _S;
@ -251,6 +281,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::SEHFinallyStmt*>(llvm::cast<clang::SEHFinallyStmt>(Stmt)); auto S = const_cast<clang::SEHFinallyStmt*>(llvm::cast<clang::SEHFinallyStmt>(Stmt));
auto _S = new AST::SEHFinallyStmt(); auto _S = new AST::SEHFinallyStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->block = static_cast<AST::CompoundStmt*>(WalkStatement(S->getBlock())); _S->block = static_cast<AST::CompoundStmt*>(WalkStatement(S->getBlock()));
_Stmt = _S; _Stmt = _S;
break; break;
@ -259,6 +290,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::SEHTryStmt*>(llvm::cast<clang::SEHTryStmt>(Stmt)); auto S = const_cast<clang::SEHTryStmt*>(llvm::cast<clang::SEHTryStmt>(Stmt));
auto _S = new AST::SEHTryStmt(); auto _S = new AST::SEHTryStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->isCXXTry = S->getIsCXXTry(); _S->isCXXTry = S->getIsCXXTry();
_S->tryBlock = static_cast<AST::CompoundStmt*>(WalkStatement(S->getTryBlock())); _S->tryBlock = static_cast<AST::CompoundStmt*>(WalkStatement(S->getTryBlock()));
_S->handler = static_cast<AST::Stmt*>(WalkStatement(S->getHandler())); _S->handler = static_cast<AST::Stmt*>(WalkStatement(S->getHandler()));
@ -271,6 +303,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::SEHLeaveStmt*>(llvm::cast<clang::SEHLeaveStmt>(Stmt)); auto S = const_cast<clang::SEHLeaveStmt*>(llvm::cast<clang::SEHLeaveStmt>(Stmt));
auto _S = new AST::SEHLeaveStmt(); auto _S = new AST::SEHLeaveStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_Stmt = _S; _Stmt = _S;
break; break;
} }
@ -278,6 +311,8 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::CapturedStmt*>(llvm::cast<clang::CapturedStmt>(Stmt)); auto S = const_cast<clang::CapturedStmt*>(llvm::cast<clang::CapturedStmt>(Stmt));
auto _S = new AST::CapturedStmt(); 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(); _S->capture_size = S->capture_size();
for (auto _E : S->capture_inits()) for (auto _E : S->capture_inits())
{ {
@ -291,6 +326,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::CXXCatchStmt*>(llvm::cast<clang::CXXCatchStmt>(Stmt)); auto S = const_cast<clang::CXXCatchStmt*>(llvm::cast<clang::CXXCatchStmt>(Stmt));
auto _S = new AST::CXXCatchStmt(); auto _S = new AST::CXXCatchStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->caughtType = GetQualifiedType(S->getCaughtType()); _S->caughtType = GetQualifiedType(S->getCaughtType());
_S->handlerBlock = static_cast<AST::Stmt*>(WalkStatement(S->getHandlerBlock())); _S->handlerBlock = static_cast<AST::Stmt*>(WalkStatement(S->getHandlerBlock()));
_Stmt = _S; _Stmt = _S;
@ -300,6 +336,8 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::CXXTryStmt*>(llvm::cast<clang::CXXTryStmt>(Stmt)); auto S = const_cast<clang::CXXTryStmt*>(llvm::cast<clang::CXXTryStmt>(Stmt));
auto _S = new AST::CXXTryStmt(); 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(); _S->numHandlers = S->getNumHandlers();
_Stmt = _S; _Stmt = _S;
break; break;
@ -308,11 +346,16 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::CXXForRangeStmt*>(llvm::cast<clang::CXXForRangeStmt>(Stmt)); auto S = const_cast<clang::CXXForRangeStmt*>(llvm::cast<clang::CXXForRangeStmt>(Stmt));
auto _S = new AST::CXXForRangeStmt(); auto _S = new AST::CXXForRangeStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->init = static_cast<AST::Stmt*>(WalkStatement(S->getInit())); _S->init = static_cast<AST::Stmt*>(WalkStatement(S->getInit()));
_S->rangeInit = static_cast<AST::Expr*>(WalkExpression(S->getRangeInit())); _S->rangeInit = static_cast<AST::Expr*>(WalkExpression(S->getRangeInit()));
_S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond())); _S->cond = static_cast<AST::Expr*>(WalkExpression(S->getCond()));
_S->inc = static_cast<AST::Expr*>(WalkExpression(S->getInc())); _S->inc = static_cast<AST::Expr*>(WalkExpression(S->getInc()));
_S->body = static_cast<AST::Stmt*>(WalkStatement(S->getBody())); _S->body = static_cast<AST::Stmt*>(WalkStatement(S->getBody()));
_S->rangeStmt = static_cast<AST::DeclStmt*>(WalkStatement(S->getRangeStmt()));
_S->beginStmt = static_cast<AST::DeclStmt*>(WalkStatement(S->getBeginStmt()));
_S->endStmt = static_cast<AST::DeclStmt*>(WalkStatement(S->getEndStmt()));
_S->loopVarStmt = static_cast<AST::DeclStmt*>(WalkStatement(S->getLoopVarStmt()));
_Stmt = _S; _Stmt = _S;
break; break;
} }
@ -320,6 +363,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::MSDependentExistsStmt*>(llvm::cast<clang::MSDependentExistsStmt>(Stmt)); auto S = const_cast<clang::MSDependentExistsStmt*>(llvm::cast<clang::MSDependentExistsStmt>(Stmt));
auto _S = new AST::MSDependentExistsStmt(); auto _S = new AST::MSDependentExistsStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->isIfExists = S->isIfExists(); _S->isIfExists = S->isIfExists();
_S->isIfNotExists = S->isIfNotExists(); _S->isIfNotExists = S->isIfNotExists();
_S->subStmt = static_cast<AST::CompoundStmt*>(WalkStatement(S->getSubStmt())); _S->subStmt = static_cast<AST::CompoundStmt*>(WalkStatement(S->getSubStmt()));
@ -330,6 +374,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::CoroutineBodyStmt*>(llvm::cast<clang::CoroutineBodyStmt>(Stmt)); auto S = const_cast<clang::CoroutineBodyStmt*>(llvm::cast<clang::CoroutineBodyStmt>(Stmt));
auto _S = new AST::CoroutineBodyStmt(); auto _S = new AST::CoroutineBodyStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->hasDependentPromiseType = S->hasDependentPromiseType(); _S->hasDependentPromiseType = S->hasDependentPromiseType();
_S->body = static_cast<AST::Stmt*>(WalkStatement(S->getBody())); _S->body = static_cast<AST::Stmt*>(WalkStatement(S->getBody()));
_S->promiseDeclStmt = static_cast<AST::Stmt*>(WalkStatement(S->getPromiseDeclStmt())); _S->promiseDeclStmt = static_cast<AST::Stmt*>(WalkStatement(S->getPromiseDeclStmt()));
@ -350,6 +395,7 @@ AST::Stmt* Parser::WalkStatement(const clang::Stmt* Stmt)
{ {
auto S = const_cast<clang::CoreturnStmt*>(llvm::cast<clang::CoreturnStmt>(Stmt)); auto S = const_cast<clang::CoreturnStmt*>(llvm::cast<clang::CoreturnStmt>(Stmt));
auto _S = new AST::CoreturnStmt(); auto _S = new AST::CoreturnStmt();
_S->stripLabelLikeStatements = static_cast<AST::Stmt*>(WalkStatement(S->stripLabelLikeStatements()));
_S->isImplicit = S->isImplicit(); _S->isImplicit = S->isImplicit();
_S->operand = static_cast<AST::Expr*>(WalkExpression(S->getOperand())); _S->operand = static_cast<AST::Expr*>(WalkExpression(S->getOperand()));
_S->promiseCall = static_cast<AST::Expr*>(WalkExpression(S->getPromiseCall())); _S->promiseCall = static_cast<AST::Expr*>(WalkExpression(S->getPromiseCall()));

19
src/CppParser/Stmt.cpp

@ -15,6 +15,7 @@ Stmt::Stmt()
: stmtClass(StmtClass::NoStmt) : stmtClass(StmtClass::NoStmt)
, sourceRange(SourceRange()) , sourceRange(SourceRange())
, endLoc(SourceLocation()) , endLoc(SourceLocation())
, stripLabelLikeStatements(nullptr)
{ {
} }
@ -22,12 +23,14 @@ Stmt::Stmt(StmtClass klass)
: stmtClass(klass) : stmtClass(klass)
, sourceRange(SourceRange()) , sourceRange(SourceRange())
, endLoc(SourceLocation()) , endLoc(SourceLocation())
, stripLabelLikeStatements(nullptr)
{ {
} }
DeclStmt::DeclStmt() DeclStmt::DeclStmt()
: Stmt(StmtClass::DeclStmt) : Stmt(StmtClass::DeclStmt)
, isSingleDecl(0) , isSingleDecl(0)
, singleDecl(nullptr)
{ {
} }
@ -44,6 +47,8 @@ CompoundStmt::CompoundStmt()
: Stmt(StmtClass::CompoundStmt) : Stmt(StmtClass::CompoundStmt)
, body_empty(0) , body_empty(0)
, size(0) , size(0)
, body_front(nullptr)
, body_back(nullptr)
, lBracLoc(SourceLocation()) , lBracLoc(SourceLocation())
, rBracLoc(SourceLocation()) , rBracLoc(SourceLocation())
{ {
@ -55,6 +60,7 @@ SwitchCase::SwitchCase()
: Stmt(StmtClass::NoStmt) : Stmt(StmtClass::NoStmt)
, keywordLoc(SourceLocation()) , keywordLoc(SourceLocation())
, colonLoc(SourceLocation()) , colonLoc(SourceLocation())
, subStmt(nullptr)
{ {
} }
@ -62,6 +68,7 @@ SwitchCase::SwitchCase(StmtClass klass)
: Stmt(klass) : Stmt(klass)
, keywordLoc(SourceLocation()) , keywordLoc(SourceLocation())
, colonLoc(SourceLocation()) , colonLoc(SourceLocation())
, subStmt(nullptr)
{ {
} }
@ -71,14 +78,12 @@ CaseStmt::CaseStmt()
, ellipsisLoc(SourceLocation()) , ellipsisLoc(SourceLocation())
, lHS(nullptr) , lHS(nullptr)
, rHS(nullptr) , rHS(nullptr)
, subStmt(nullptr)
, caseStmtIsGNURange(0) , caseStmtIsGNURange(0)
{ {
} }
DefaultStmt::DefaultStmt() DefaultStmt::DefaultStmt()
: SwitchCase(StmtClass::DefaultStmt) : SwitchCase(StmtClass::DefaultStmt)
, subStmt(nullptr)
, defaultLoc(SourceLocation()) , defaultLoc(SourceLocation())
{ {
} }
@ -94,6 +99,7 @@ LabelStmt::LabelStmt()
AttributedStmt::AttributedStmt() AttributedStmt::AttributedStmt()
: Stmt(StmtClass::AttributedStmt) : Stmt(StmtClass::AttributedStmt)
, attrLoc(SourceLocation()) , attrLoc(SourceLocation())
, subStmt(nullptr)
{ {
} }
@ -109,6 +115,7 @@ IfStmt::IfStmt()
, hasInitStorage(0) , hasInitStorage(0)
, hasVarStorage(0) , hasVarStorage(0)
, hasElseStorage(0) , hasElseStorage(0)
, conditionVariableDeclStmt(nullptr)
, isObjCAvailabilityCheck(0) , isObjCAvailabilityCheck(0)
{ {
} }
@ -121,6 +128,7 @@ SwitchStmt::SwitchStmt()
, switchLoc(SourceLocation()) , switchLoc(SourceLocation())
, hasInitStorage(0) , hasInitStorage(0)
, hasVarStorage(0) , hasVarStorage(0)
, conditionVariableDeclStmt(nullptr)
, isAllEnumCasesCovered(0) , isAllEnumCasesCovered(0)
{ {
} }
@ -131,6 +139,7 @@ WhileStmt::WhileStmt()
, body(nullptr) , body(nullptr)
, whileLoc(SourceLocation()) , whileLoc(SourceLocation())
, hasVarStorage(0) , hasVarStorage(0)
, conditionVariableDeclStmt(nullptr)
{ {
} }
@ -275,6 +284,7 @@ CapturedStmt::Capture::Capture()
CapturedStmt::CapturedStmt() CapturedStmt::CapturedStmt()
: Stmt(StmtClass::CapturedStmt) : Stmt(StmtClass::CapturedStmt)
, capturedStmt(nullptr)
, capture_size(0) , capture_size(0)
{ {
} }
@ -292,6 +302,7 @@ CXXCatchStmt::CXXCatchStmt()
CXXTryStmt::CXXTryStmt() CXXTryStmt::CXXTryStmt()
: Stmt(StmtClass::CXXTryStmt) : Stmt(StmtClass::CXXTryStmt)
, tryLoc(SourceLocation()) , tryLoc(SourceLocation())
, tryBlock(nullptr)
, numHandlers(0) , numHandlers(0)
{ {
} }
@ -303,6 +314,10 @@ CXXForRangeStmt::CXXForRangeStmt()
, cond(nullptr) , cond(nullptr)
, inc(nullptr) , inc(nullptr)
, body(nullptr) , body(nullptr)
, rangeStmt(nullptr)
, beginStmt(nullptr)
, endStmt(nullptr)
, loopVarStmt(nullptr)
, forLoc(SourceLocation()) , forLoc(SourceLocation())
, coawaitLoc(SourceLocation()) , coawaitLoc(SourceLocation())
, colonLoc(SourceLocation()) , colonLoc(SourceLocation())

17
src/CppParser/Stmt.h

@ -154,6 +154,7 @@ public:
StmtClass stmtClass; StmtClass stmtClass;
SourceRange sourceRange; SourceRange sourceRange;
SourceLocation endLoc; SourceLocation endLoc;
Stmt* stripLabelLikeStatements;
}; };
class CS_API DeclStmt : public Stmt class CS_API DeclStmt : public Stmt
@ -162,6 +163,7 @@ public:
DeclStmt(); DeclStmt();
VECTOR(Declaration*, decls) VECTOR(Declaration*, decls)
bool isSingleDecl; bool isSingleDecl;
Declaration* singleDecl;
}; };
class CS_API NullStmt : public Stmt class CS_API NullStmt : public Stmt
@ -179,6 +181,8 @@ public:
VECTOR(Stmt*, body) VECTOR(Stmt*, body)
bool body_empty; bool body_empty;
unsigned int size; unsigned int size;
Stmt* body_front;
Stmt* body_back;
SourceLocation lBracLoc; SourceLocation lBracLoc;
SourceLocation rBracLoc; SourceLocation rBracLoc;
}; };
@ -190,6 +194,7 @@ public:
SwitchCase(StmtClass klass); SwitchCase(StmtClass klass);
SourceLocation keywordLoc; SourceLocation keywordLoc;
SourceLocation colonLoc; SourceLocation colonLoc;
Stmt* subStmt;
}; };
class CS_API CaseStmt : public SwitchCase class CS_API CaseStmt : public SwitchCase
@ -200,7 +205,6 @@ public:
SourceLocation ellipsisLoc; SourceLocation ellipsisLoc;
Expr* lHS; Expr* lHS;
Expr* rHS; Expr* rHS;
Stmt* subStmt;
bool caseStmtIsGNURange; bool caseStmtIsGNURange;
}; };
@ -208,7 +212,6 @@ class CS_API DefaultStmt : public SwitchCase
{ {
public: public:
DefaultStmt(); DefaultStmt();
Stmt* subStmt;
SourceLocation defaultLoc; SourceLocation defaultLoc;
}; };
@ -226,6 +229,7 @@ class CS_API AttributedStmt : public Stmt
public: public:
AttributedStmt(); AttributedStmt();
SourceLocation attrLoc; SourceLocation attrLoc;
Stmt* subStmt;
}; };
class CS_API IfStmt : public Stmt class CS_API IfStmt : public Stmt
@ -242,6 +246,7 @@ public:
bool hasInitStorage; bool hasInitStorage;
bool hasVarStorage; bool hasVarStorage;
bool hasElseStorage; bool hasElseStorage;
DeclStmt* conditionVariableDeclStmt;
bool isObjCAvailabilityCheck; bool isObjCAvailabilityCheck;
}; };
@ -255,6 +260,7 @@ public:
SourceLocation switchLoc; SourceLocation switchLoc;
bool hasInitStorage; bool hasInitStorage;
bool hasVarStorage; bool hasVarStorage;
DeclStmt* conditionVariableDeclStmt;
bool isAllEnumCasesCovered; bool isAllEnumCasesCovered;
}; };
@ -266,6 +272,7 @@ public:
Stmt* body; Stmt* body;
SourceLocation whileLoc; SourceLocation whileLoc;
bool hasVarStorage; bool hasVarStorage;
DeclStmt* conditionVariableDeclStmt;
}; };
class CS_API DoStmt : public Stmt class CS_API DoStmt : public Stmt
@ -445,6 +452,7 @@ public:
CapturedStmt(); CapturedStmt();
VECTOR(Expr*, capture_inits) VECTOR(Expr*, capture_inits)
Stmt* capturedStmt;
unsigned int capture_size; unsigned int capture_size;
}; };
@ -462,6 +470,7 @@ class CS_API CXXTryStmt : public Stmt
public: public:
CXXTryStmt(); CXXTryStmt();
SourceLocation tryLoc; SourceLocation tryLoc;
CompoundStmt* tryBlock;
unsigned int numHandlers; unsigned int numHandlers;
}; };
@ -474,6 +483,10 @@ public:
Expr* cond; Expr* cond;
Expr* inc; Expr* inc;
Stmt* body; Stmt* body;
DeclStmt* rangeStmt;
DeclStmt* beginStmt;
DeclStmt* endStmt;
DeclStmt* loopVarStmt;
SourceLocation forLoc; SourceLocation forLoc;
SourceLocation coawaitLoc; SourceLocation coawaitLoc;
SourceLocation colonLoc; SourceLocation colonLoc;

460
src/Parser/ASTConverter.Expr.cs

File diff suppressed because it is too large Load Diff

45
src/Parser/ASTConverter.Stmt.cs

@ -691,7 +691,9 @@ namespace CppSharp
var _stmt = new AST.DeclStmt(); var _stmt = new AST.DeclStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.IsSingleDecl = stmt.IsSingleDecl; _stmt.IsSingleDecl = stmt.IsSingleDecl;
_stmt.SingleDecl = VisitDeclaration(stmt.SingleDecl) as AST.Declaration;
for (uint i = 0; i < stmt.GetdeclsCount; i++) for (uint i = 0; i < stmt.GetdeclsCount; i++)
{ {
var _E = stmt.Getdecls(i); var _E = stmt.Getdecls(i);
@ -705,6 +707,7 @@ namespace CppSharp
var _stmt = new AST.NullStmt(); var _stmt = new AST.NullStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.SemiLoc = VisitSourceLocation(stmt.SemiLoc); _stmt.SemiLoc = VisitSourceLocation(stmt.SemiLoc);
_stmt.HasLeadingEmptyMacro = stmt.HasLeadingEmptyMacro; _stmt.HasLeadingEmptyMacro = stmt.HasLeadingEmptyMacro;
return _stmt; return _stmt;
@ -715,8 +718,11 @@ namespace CppSharp
var _stmt = new AST.CompoundStmt(); var _stmt = new AST.CompoundStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.BodyEmpty = stmt.BodyEmpty; _stmt.BodyEmpty = stmt.BodyEmpty;
_stmt.Size = stmt.Size; _stmt.Size = stmt.Size;
_stmt.BodyFront = VisitStatement(stmt.BodyFront) as AST.Stmt;
_stmt.BodyBack = VisitStatement(stmt.BodyBack) as AST.Stmt;
_stmt.LBracLoc = VisitSourceLocation(stmt.LBracLoc); _stmt.LBracLoc = VisitSourceLocation(stmt.LBracLoc);
_stmt.RBracLoc = VisitSourceLocation(stmt.RBracLoc); _stmt.RBracLoc = VisitSourceLocation(stmt.RBracLoc);
for (uint i = 0; i < stmt.GetbodyCount; i++) for (uint i = 0; i < stmt.GetbodyCount; i++)
@ -732,13 +738,14 @@ namespace CppSharp
var _stmt = new AST.CaseStmt(); var _stmt = new AST.CaseStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.KeywordLoc = VisitSourceLocation(stmt.KeywordLoc); _stmt.KeywordLoc = VisitSourceLocation(stmt.KeywordLoc);
_stmt.ColonLoc = VisitSourceLocation(stmt.ColonLoc); _stmt.ColonLoc = VisitSourceLocation(stmt.ColonLoc);
_stmt.SubStmt = VisitStatement(stmt.SubStmt) as AST.Stmt;
_stmt.CaseLoc = VisitSourceLocation(stmt.CaseLoc); _stmt.CaseLoc = VisitSourceLocation(stmt.CaseLoc);
_stmt.EllipsisLoc = VisitSourceLocation(stmt.EllipsisLoc); _stmt.EllipsisLoc = VisitSourceLocation(stmt.EllipsisLoc);
_stmt.LHS = VisitExpression(stmt.LHS) as AST.Expr; _stmt.LHS = VisitExpression(stmt.LHS) as AST.Expr;
_stmt.RHS = VisitExpression(stmt.RHS) as AST.Expr; _stmt.RHS = VisitExpression(stmt.RHS) as AST.Expr;
_stmt.SubStmt = VisitStatement(stmt.SubStmt) as AST.Stmt;
_stmt.CaseStmtIsGNURange = stmt.CaseStmtIsGNURange; _stmt.CaseStmtIsGNURange = stmt.CaseStmtIsGNURange;
return _stmt; return _stmt;
} }
@ -748,6 +755,7 @@ namespace CppSharp
var _stmt = new AST.DefaultStmt(); var _stmt = new AST.DefaultStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.KeywordLoc = VisitSourceLocation(stmt.KeywordLoc); _stmt.KeywordLoc = VisitSourceLocation(stmt.KeywordLoc);
_stmt.ColonLoc = VisitSourceLocation(stmt.ColonLoc); _stmt.ColonLoc = VisitSourceLocation(stmt.ColonLoc);
_stmt.SubStmt = VisitStatement(stmt.SubStmt) as AST.Stmt; _stmt.SubStmt = VisitStatement(stmt.SubStmt) as AST.Stmt;
@ -760,6 +768,7 @@ namespace CppSharp
var _stmt = new AST.LabelStmt(); var _stmt = new AST.LabelStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.IdentLoc = VisitSourceLocation(stmt.IdentLoc); _stmt.IdentLoc = VisitSourceLocation(stmt.IdentLoc);
_stmt.SubStmt = VisitStatement(stmt.SubStmt) as AST.Stmt; _stmt.SubStmt = VisitStatement(stmt.SubStmt) as AST.Stmt;
_stmt.Name = stmt.Name; _stmt.Name = stmt.Name;
@ -771,7 +780,9 @@ namespace CppSharp
var _stmt = new AST.AttributedStmt(); var _stmt = new AST.AttributedStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.AttrLoc = VisitSourceLocation(stmt.AttrLoc); _stmt.AttrLoc = VisitSourceLocation(stmt.AttrLoc);
_stmt.SubStmt = VisitStatement(stmt.SubStmt) as AST.Stmt;
return _stmt; return _stmt;
} }
@ -780,6 +791,7 @@ namespace CppSharp
var _stmt = new AST.IfStmt(); var _stmt = new AST.IfStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.Cond = VisitExpression(stmt.Cond) as AST.Expr; _stmt.Cond = VisitExpression(stmt.Cond) as AST.Expr;
_stmt.Then = VisitStatement(stmt.Then) as AST.Stmt; _stmt.Then = VisitStatement(stmt.Then) as AST.Stmt;
_stmt.Else = VisitStatement(stmt.Else) as AST.Stmt; _stmt.Else = VisitStatement(stmt.Else) as AST.Stmt;
@ -790,6 +802,7 @@ namespace CppSharp
_stmt.HasInitStorage = stmt.HasInitStorage; _stmt.HasInitStorage = stmt.HasInitStorage;
_stmt.HasVarStorage = stmt.HasVarStorage; _stmt.HasVarStorage = stmt.HasVarStorage;
_stmt.HasElseStorage = stmt.HasElseStorage; _stmt.HasElseStorage = stmt.HasElseStorage;
_stmt.ConditionVariableDeclStmt = VisitStatement(stmt.ConditionVariableDeclStmt) as AST.DeclStmt;
_stmt.IsObjCAvailabilityCheck = stmt.IsObjCAvailabilityCheck; _stmt.IsObjCAvailabilityCheck = stmt.IsObjCAvailabilityCheck;
return _stmt; return _stmt;
} }
@ -799,12 +812,14 @@ namespace CppSharp
var _stmt = new AST.SwitchStmt(); var _stmt = new AST.SwitchStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.Cond = VisitExpression(stmt.Cond) as AST.Expr; _stmt.Cond = VisitExpression(stmt.Cond) as AST.Expr;
_stmt.Body = VisitStatement(stmt.Body) as AST.Stmt; _stmt.Body = VisitStatement(stmt.Body) as AST.Stmt;
_stmt.Init = VisitStatement(stmt.Init) as AST.Stmt; _stmt.Init = VisitStatement(stmt.Init) as AST.Stmt;
_stmt.SwitchLoc = VisitSourceLocation(stmt.SwitchLoc); _stmt.SwitchLoc = VisitSourceLocation(stmt.SwitchLoc);
_stmt.HasInitStorage = stmt.HasInitStorage; _stmt.HasInitStorage = stmt.HasInitStorage;
_stmt.HasVarStorage = stmt.HasVarStorage; _stmt.HasVarStorage = stmt.HasVarStorage;
_stmt.ConditionVariableDeclStmt = VisitStatement(stmt.ConditionVariableDeclStmt) as AST.DeclStmt;
_stmt.IsAllEnumCasesCovered = stmt.IsAllEnumCasesCovered; _stmt.IsAllEnumCasesCovered = stmt.IsAllEnumCasesCovered;
return _stmt; return _stmt;
} }
@ -814,10 +829,12 @@ namespace CppSharp
var _stmt = new AST.WhileStmt(); var _stmt = new AST.WhileStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.Cond = VisitExpression(stmt.Cond) as AST.Expr; _stmt.Cond = VisitExpression(stmt.Cond) as AST.Expr;
_stmt.Body = VisitStatement(stmt.Body) as AST.Stmt; _stmt.Body = VisitStatement(stmt.Body) as AST.Stmt;
_stmt.WhileLoc = VisitSourceLocation(stmt.WhileLoc); _stmt.WhileLoc = VisitSourceLocation(stmt.WhileLoc);
_stmt.HasVarStorage = stmt.HasVarStorage; _stmt.HasVarStorage = stmt.HasVarStorage;
_stmt.ConditionVariableDeclStmt = VisitStatement(stmt.ConditionVariableDeclStmt) as AST.DeclStmt;
return _stmt; return _stmt;
} }
@ -826,6 +843,7 @@ namespace CppSharp
var _stmt = new AST.DoStmt(); var _stmt = new AST.DoStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.Cond = VisitExpression(stmt.Cond) as AST.Expr; _stmt.Cond = VisitExpression(stmt.Cond) as AST.Expr;
_stmt.Body = VisitStatement(stmt.Body) as AST.Stmt; _stmt.Body = VisitStatement(stmt.Body) as AST.Stmt;
_stmt.DoLoc = VisitSourceLocation(stmt.DoLoc); _stmt.DoLoc = VisitSourceLocation(stmt.DoLoc);
@ -839,6 +857,7 @@ namespace CppSharp
var _stmt = new AST.ForStmt(); var _stmt = new AST.ForStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.Init = VisitStatement(stmt.Init) as AST.Stmt; _stmt.Init = VisitStatement(stmt.Init) as AST.Stmt;
_stmt.Cond = VisitExpression(stmt.Cond) as AST.Expr; _stmt.Cond = VisitExpression(stmt.Cond) as AST.Expr;
_stmt.Inc = VisitExpression(stmt.Inc) as AST.Expr; _stmt.Inc = VisitExpression(stmt.Inc) as AST.Expr;
@ -855,6 +874,7 @@ namespace CppSharp
var _stmt = new AST.GotoStmt(); var _stmt = new AST.GotoStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.GotoLoc = VisitSourceLocation(stmt.GotoLoc); _stmt.GotoLoc = VisitSourceLocation(stmt.GotoLoc);
_stmt.LabelLoc = VisitSourceLocation(stmt.LabelLoc); _stmt.LabelLoc = VisitSourceLocation(stmt.LabelLoc);
return _stmt; return _stmt;
@ -865,6 +885,7 @@ namespace CppSharp
var _stmt = new AST.IndirectGotoStmt(); var _stmt = new AST.IndirectGotoStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.GotoLoc = VisitSourceLocation(stmt.GotoLoc); _stmt.GotoLoc = VisitSourceLocation(stmt.GotoLoc);
_stmt.StarLoc = VisitSourceLocation(stmt.StarLoc); _stmt.StarLoc = VisitSourceLocation(stmt.StarLoc);
_stmt.Target = VisitExpression(stmt.Target) as AST.Expr; _stmt.Target = VisitExpression(stmt.Target) as AST.Expr;
@ -876,6 +897,7 @@ namespace CppSharp
var _stmt = new AST.ContinueStmt(); var _stmt = new AST.ContinueStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.ContinueLoc = VisitSourceLocation(stmt.ContinueLoc); _stmt.ContinueLoc = VisitSourceLocation(stmt.ContinueLoc);
return _stmt; return _stmt;
} }
@ -885,6 +907,7 @@ namespace CppSharp
var _stmt = new AST.BreakStmt(); var _stmt = new AST.BreakStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.BreakLoc = VisitSourceLocation(stmt.BreakLoc); _stmt.BreakLoc = VisitSourceLocation(stmt.BreakLoc);
return _stmt; return _stmt;
} }
@ -894,6 +917,7 @@ namespace CppSharp
var _stmt = new AST.ReturnStmt(); var _stmt = new AST.ReturnStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.RetValue = VisitExpression(stmt.RetValue) as AST.Expr; _stmt.RetValue = VisitExpression(stmt.RetValue) as AST.Expr;
_stmt.ReturnLoc = VisitSourceLocation(stmt.ReturnLoc); _stmt.ReturnLoc = VisitSourceLocation(stmt.ReturnLoc);
return _stmt; return _stmt;
@ -904,6 +928,7 @@ namespace CppSharp
var _stmt = new AST.GCCAsmStmt(); var _stmt = new AST.GCCAsmStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.AsmLoc = VisitSourceLocation(stmt.AsmLoc); _stmt.AsmLoc = VisitSourceLocation(stmt.AsmLoc);
_stmt.Simple = stmt.Simple; _stmt.Simple = stmt.Simple;
_stmt.Volatile = stmt.Volatile; _stmt.Volatile = stmt.Volatile;
@ -930,6 +955,7 @@ namespace CppSharp
var _stmt = new AST.MSAsmStmt(); var _stmt = new AST.MSAsmStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.AsmLoc = VisitSourceLocation(stmt.AsmLoc); _stmt.AsmLoc = VisitSourceLocation(stmt.AsmLoc);
_stmt.Simple = stmt.Simple; _stmt.Simple = stmt.Simple;
_stmt.Volatile = stmt.Volatile; _stmt.Volatile = stmt.Volatile;
@ -959,6 +985,7 @@ namespace CppSharp
var _stmt = new AST.SEHExceptStmt(); var _stmt = new AST.SEHExceptStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.ExceptLoc = VisitSourceLocation(stmt.ExceptLoc); _stmt.ExceptLoc = VisitSourceLocation(stmt.ExceptLoc);
_stmt.FilterExpr = VisitExpression(stmt.FilterExpr) as AST.Expr; _stmt.FilterExpr = VisitExpression(stmt.FilterExpr) as AST.Expr;
_stmt.Block = VisitStatement(stmt.Block) as AST.CompoundStmt; _stmt.Block = VisitStatement(stmt.Block) as AST.CompoundStmt;
@ -970,6 +997,7 @@ namespace CppSharp
var _stmt = new AST.SEHFinallyStmt(); var _stmt = new AST.SEHFinallyStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.FinallyLoc = VisitSourceLocation(stmt.FinallyLoc); _stmt.FinallyLoc = VisitSourceLocation(stmt.FinallyLoc);
_stmt.Block = VisitStatement(stmt.Block) as AST.CompoundStmt; _stmt.Block = VisitStatement(stmt.Block) as AST.CompoundStmt;
return _stmt; return _stmt;
@ -980,6 +1008,7 @@ namespace CppSharp
var _stmt = new AST.SEHTryStmt(); var _stmt = new AST.SEHTryStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.TryLoc = VisitSourceLocation(stmt.TryLoc); _stmt.TryLoc = VisitSourceLocation(stmt.TryLoc);
_stmt.IsCXXTry = stmt.IsCXXTry; _stmt.IsCXXTry = stmt.IsCXXTry;
_stmt.TryBlock = VisitStatement(stmt.TryBlock) as AST.CompoundStmt; _stmt.TryBlock = VisitStatement(stmt.TryBlock) as AST.CompoundStmt;
@ -994,6 +1023,7 @@ namespace CppSharp
var _stmt = new AST.SEHLeaveStmt(); var _stmt = new AST.SEHLeaveStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.LeaveLoc = VisitSourceLocation(stmt.LeaveLoc); _stmt.LeaveLoc = VisitSourceLocation(stmt.LeaveLoc);
return _stmt; return _stmt;
} }
@ -1003,6 +1033,8 @@ namespace CppSharp
var _stmt = new AST.CapturedStmt(); var _stmt = new AST.CapturedStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.capturedStmt = VisitStatement(stmt.capturedStmt) as AST.Stmt;
_stmt.CaptureSize = stmt.CaptureSize; _stmt.CaptureSize = stmt.CaptureSize;
for (uint i = 0; i < stmt.GetcaptureInitsCount; i++) for (uint i = 0; i < stmt.GetcaptureInitsCount; i++)
{ {
@ -1017,6 +1049,7 @@ namespace CppSharp
var _stmt = new AST.CXXCatchStmt(); var _stmt = new AST.CXXCatchStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.CatchLoc = VisitSourceLocation(stmt.CatchLoc); _stmt.CatchLoc = VisitSourceLocation(stmt.CatchLoc);
_stmt.CaughtType = VisitQualifiedType(stmt.CaughtType); _stmt.CaughtType = VisitQualifiedType(stmt.CaughtType);
_stmt.HandlerBlock = VisitStatement(stmt.HandlerBlock) as AST.Stmt; _stmt.HandlerBlock = VisitStatement(stmt.HandlerBlock) as AST.Stmt;
@ -1028,7 +1061,9 @@ namespace CppSharp
var _stmt = new AST.CXXTryStmt(); var _stmt = new AST.CXXTryStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.TryLoc = VisitSourceLocation(stmt.TryLoc); _stmt.TryLoc = VisitSourceLocation(stmt.TryLoc);
_stmt.TryBlock = VisitStatement(stmt.TryBlock) as AST.CompoundStmt;
_stmt.NumHandlers = stmt.NumHandlers; _stmt.NumHandlers = stmt.NumHandlers;
return _stmt; return _stmt;
} }
@ -1038,11 +1073,16 @@ namespace CppSharp
var _stmt = new AST.CXXForRangeStmt(); var _stmt = new AST.CXXForRangeStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.Init = VisitStatement(stmt.Init) as AST.Stmt; _stmt.Init = VisitStatement(stmt.Init) as AST.Stmt;
_stmt.RangeInit = VisitExpression(stmt.RangeInit) as AST.Expr; _stmt.RangeInit = VisitExpression(stmt.RangeInit) as AST.Expr;
_stmt.Cond = VisitExpression(stmt.Cond) as AST.Expr; _stmt.Cond = VisitExpression(stmt.Cond) as AST.Expr;
_stmt.Inc = VisitExpression(stmt.Inc) as AST.Expr; _stmt.Inc = VisitExpression(stmt.Inc) as AST.Expr;
_stmt.Body = VisitStatement(stmt.Body) as AST.Stmt; _stmt.Body = VisitStatement(stmt.Body) as AST.Stmt;
_stmt.RangeStmt = VisitStatement(stmt.RangeStmt) as AST.DeclStmt;
_stmt.BeginStmt = VisitStatement(stmt.BeginStmt) as AST.DeclStmt;
_stmt.EndStmt = VisitStatement(stmt.EndStmt) as AST.DeclStmt;
_stmt.LoopVarStmt = VisitStatement(stmt.LoopVarStmt) as AST.DeclStmt;
_stmt.ForLoc = VisitSourceLocation(stmt.ForLoc); _stmt.ForLoc = VisitSourceLocation(stmt.ForLoc);
_stmt.CoawaitLoc = VisitSourceLocation(stmt.CoawaitLoc); _stmt.CoawaitLoc = VisitSourceLocation(stmt.CoawaitLoc);
_stmt.ColonLoc = VisitSourceLocation(stmt.ColonLoc); _stmt.ColonLoc = VisitSourceLocation(stmt.ColonLoc);
@ -1055,6 +1095,7 @@ namespace CppSharp
var _stmt = new AST.MSDependentExistsStmt(); var _stmt = new AST.MSDependentExistsStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.KeywordLoc = VisitSourceLocation(stmt.KeywordLoc); _stmt.KeywordLoc = VisitSourceLocation(stmt.KeywordLoc);
_stmt.IsIfExists = stmt.IsIfExists; _stmt.IsIfExists = stmt.IsIfExists;
_stmt.IsIfNotExists = stmt.IsIfNotExists; _stmt.IsIfNotExists = stmt.IsIfNotExists;
@ -1067,6 +1108,7 @@ namespace CppSharp
var _stmt = new AST.CoroutineBodyStmt(); var _stmt = new AST.CoroutineBodyStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.HasDependentPromiseType = stmt.HasDependentPromiseType; _stmt.HasDependentPromiseType = stmt.HasDependentPromiseType;
_stmt.Body = VisitStatement(stmt.Body) as AST.Stmt; _stmt.Body = VisitStatement(stmt.Body) as AST.Stmt;
_stmt.PromiseDeclStmt = VisitStatement(stmt.PromiseDeclStmt) as AST.Stmt; _stmt.PromiseDeclStmt = VisitStatement(stmt.PromiseDeclStmt) as AST.Stmt;
@ -1088,6 +1130,7 @@ namespace CppSharp
var _stmt = new AST.CoreturnStmt(); var _stmt = new AST.CoreturnStmt();
_stmt.SourceRange = VisitSourceRange(stmt.SourceRange); _stmt.SourceRange = VisitSourceRange(stmt.SourceRange);
_stmt.EndLoc = VisitSourceLocation(stmt.EndLoc); _stmt.EndLoc = VisitSourceLocation(stmt.EndLoc);
_stmt.StripLabelLikeStatements = VisitStatement(stmt.StripLabelLikeStatements) as AST.Stmt;
_stmt.IsImplicit = stmt.IsImplicit; _stmt.IsImplicit = stmt.IsImplicit;
_stmt.KeywordLoc = VisitSourceLocation(stmt.KeywordLoc); _stmt.KeywordLoc = VisitSourceLocation(stmt.KeywordLoc);
_stmt.Operand = VisitExpression(stmt.Operand) as AST.Expr; _stmt.Operand = VisitExpression(stmt.Operand) as AST.Expr;

Loading…
Cancel
Save