Exemplo n.º 1
0
        public IStatement CreateStatement(string str, StatementClass Class, IDeclaration decl)
        {
            var ret = new Statement();

            ret.String = str;
            return(ret);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
 public abstract void UpdateStatementClass(StatementClass statementClass);
Exemplo n.º 5
0
 public abstract void AddStatementClass(StatementClass statementClass);
Exemplo n.º 6
0
 public Expression(string str, StatementClass Class = StatementClass.Any, Declaration decl = null)
     : base(str, Class, decl)
 {
 }
Exemplo n.º 7
0
 public Statement(string str, StatementClass Class = StatementClass.Any, Declaration decl = null)
 {
 }