Exemplo n.º 1
0
        public override MultilineStatement Interprete(string src)
        {
            var    returns = new ForEachStmt();
            string temp    = "";

            for (int index = 0;
                 index < src.Split(new[] { '\n', ';' }, StringSplitOptions.RemoveEmptyEntries).Length;
                 index++)
            {
                string i = src.Split(new[] { '\n', ';' }, StringSplitOptions.RemoveEmptyEntries)[index];
                if (index == 0)
                {
                    returns.Header = i;
                }
                else if (index > 0 &&
                         index < src.Split(new[] { '\n', ';' }, StringSplitOptions.RemoveEmptyEntries).Length - 1)
                {
                    temp += i + ";\n";
                    ;
                }
            }
            returns.Nodes = Parser.ParseCodeBlock(temp, "").Nodes;


            return(returns);
        }
Exemplo n.º 2
0
        public override MultilineStatement Interprete(string src)
        {
            var returns = new ForEachStmt();
            string temp = "";
            for (int index = 0;
                index < src.Split(new[] { '\n', ';' }, StringSplitOptions.RemoveEmptyEntries).Length;
                index++)
            {
                string i = src.Split(new[] { '\n', ';' }, StringSplitOptions.RemoveEmptyEntries)[index];
                if (index == 0)
                {
                    returns.Header = i;
                }
                else if (index > 0
                         && index < src.Split(new[] { '\n', ';' }, StringSplitOptions.RemoveEmptyEntries).Length - 1)
                {
                    temp += i + ";\n";
                    ;
                }
            }
            returns.Nodes = Parser.ParseCodeBlock(temp, "").Nodes;

            return returns;
        }