Exemplo n.º 1
0
        List <ILExpression> GetArguments(IList <ILNode> nodes, int index, int count, bool remove = true)
        {
            List <ILExpression> args = new List <ILExpression>();
            int scount = count;

            for (int i = index; i >= 0 && count > 0; i--, count--)
            {
                ILNode n = nodes[i];
                if (n.isNodeResolved())
                {
                    args.Add(n.MatchSingleArgument());
                }
                else
                {
                    break;
                }
            }
            if (remove && count == 0)
            {
                if (scount == 1)
                {
                    nodes.RemoveAt(index);
                }
                else
                {
                    for (int i = index; i >= 0 && scount > 0; i--, scount--)
                    {
                        nodes.RemoveAt(i);
                    }
                    // nodes.RemoveRange(index - scount + 1, scount);
                }
            }
            return(count == 0 ? args : null);
        }