public IStatement CreateStatement(string str, StatementClass Class, IDeclaration decl) { var ret = new Statement(); ret.String = str; return(ret); }
public override StatementClass GetStatementClassByKey(Key key) { StatementClass result = null; List <StatementClass> statementClassesWithSameID = _metaData?.StatementClasses.FindAll(res => res.ID == key.ID); if (statementClassesWithSameID.Count != 0) { result = statementClassesWithSameID.Find(r => r.Revision == key.Revision); } return(result); }
public IExpression CreateExpression(string str, StatementClass Class, IDeclaration decl) { IExpression ret = null; switch (Class) { /*case StatementClass.BinaryOperator: * ret = new CppSharp.AST.BinaryOperator(); * break;*/ case StatementClass.DeclarationReference: ret = new CppSharp.AST.BuiltinTypeExpression(); ret.Class = StatementClass.DeclarationReference; break; case StatementClass.Call: ret = new CppSharp.AST.CallExpr(); break; case StatementClass.ConstructorReference: ret = new CppSharp.AST.CXXConstructExpr(); break; case StatementClass.CXXOperatorCall: ret = new CppSharp.AST.BuiltinTypeExpression(); ret.Class = StatementClass.CXXOperatorCall; break; case StatementClass.ImplicitCast: ret = new CppSharp.AST.CallExpr(); break; case StatementClass.ExplicitCast: ret = new CppSharp.AST.CallExpr(); break; case StatementClass.InitList: ret = new CppSharp.AST.InitListExpr(); break; case StatementClass.SubStmt: ret = new CppSharp.AST.SubStmtExpr(); break; default: throw new NotImplementedException(); } ret.String = str; ret.Declaration = decl; return(ret); }
public abstract void UpdateStatementClass(StatementClass statementClass);
public abstract void AddStatementClass(StatementClass statementClass);
public Expression(string str, StatementClass Class = StatementClass.Any, Declaration decl = null) : base(str, Class, decl) { }
public Statement(string str, StatementClass Class = StatementClass.Any, Declaration decl = null) { }