Esempio n. 1
0
 internal xcall(Call c)
 {
     func = parser(c.func);
     args = parser(c.args) as xastlist;
 }
Esempio n. 2
0
        public xast parser(AST ast)
        {
            xast ret = null;

            if (ast == null)
            {
            }
            else if (ast is VariableDeclaration)
            {
                ret = new xvardeclare((VariableDeclaration)ast);
            }
            else if (ast is Assign)
            {
                ret = new xassing((Assign)ast);
            }
            else if (ast is If)
            {
                ret = new xif((If)ast);
            }
            else if (ast is While)
            {
                ret = new xwhile((While)ast);
            }
            else if (ast is Expression)
            {
                ret = new xexpr((Expression)ast);
            }
            else if (ast is Block)
            {
                ret = new xblock((Block)ast);
            }
            else if (ast is ConstantWrapper)
            {
                ret = new xconstantwrapper((ConstantWrapper)ast);
            }
            else if (ast is For)
            {
                ret = new xfor((For)ast);
            }
            else if (ast is Call)
            {
                ret = new xcall((Call)ast);
            }
            else if (ast is Equality)
            {
                ret = new xequality((Equality)ast);
            }
            else if (ast is Relational)
            {
                ret = new xrelational((Relational)ast);
            }
            else if (ast is PostOrPrefixOperator)
            {
                ret = new xpostorprefixoperator((PostOrPrefixOperator)ast);
            }
            else if (ast is Lookup)
            {
                ret = new xlookup((Lookup)ast);
            }
            else if (ast is Call)
            {
                ret = new xcall((Call)ast);
            }
            else if (ast is ASTList)
            {
                ret = new xastlist((ASTList)ast);
            }
            return(ret);
        }