Ejemplo n.º 1
0
        private static Tree.IExpression[] GetArguments(Gen::List <Tree.IExpression> args_rev)
        {
            Tree.IExpression[] args = new Tree.IExpression[args_rev.Count];
            for (int iS = args_rev.Count - 1, iD = 0; iS >= 0; iS--, iD++)
            {
                args[iD] = args_rev[iS];
            }

            return(args);
        }
Ejemplo n.º 2
0
            //------------------------------------------------------------------
            //	結果の取得
            //------------------------------------------------------------------
            /// <summary>
            /// 引数を順番に格納した配列を取得します。
            /// </summary>
            /// <returns></returns>
            public Tree.IExpression[] GetArguments()
            {
                if (index == 0 && args_rev[0] == null)
                {
                    return(new Tree.IExpression[0]);
                }

                Tree.IExpression[] args = new Tree.IExpression[args_rev.Count];
                for (int iS = args_rev.Count - 1, iD = 0; iS >= 0; iS--, iD++)
                {
                    args[iD] = args_rev[iS];
                }

                return(args);
            }
Ejemplo n.º 3
0
 public BinaryPrefixElement(BinaryOperatorDef def, IExpressionElement left)
 {
     this.priority = def.prioR;
     this.op       = def.word;
     this.left     = left.Expression;
 }
Ejemplo n.º 4
0
 public ExpressionElement(Tree.IExpression expression)
 {
     this.expression = expression;
 }
Ejemplo n.º 5
0
 public static string TestParse(string input)
 {
     Tree.IExpression e = Cobalt.Parse.LanguageDefinition.Parse(input);
     return(e.ToSource());
 }