Pytocs.TypeInference.State.ReportUnpackMismatch C# (CSharp) Method

ReportUnpackMismatch() private static method

private static ReportUnpackMismatch ( Analyzer analyzer, List xs, int vsize ) : void
analyzer Analyzer
xs List
vsize int
return void
        private static void ReportUnpackMismatch(Analyzer analyzer, List<Exp> xs, int vsize)
        {
            int xsize = xs.Count;
            int beg = xs[0].Start;
            int end = xs[xs.Count - 1].End;
            int diff = xsize - vsize;
            string msg;
            if (diff > 0)
            {
                msg = "ValueError: need more than " + vsize + " values to unpack";
            }
            else
            {
                msg = "ValueError: too many values to unpack";
            }
            analyzer.putProblem(xs[0].Filename, beg, end, msg);
        }