Exemplo n.º 1
0
        private void UpdateRange()
        {
            FirstLine = Int32.MaxValue;
            LastLine  = 0;

            var enumerator = Expressions.GetEnumerator();

            while (enumerator.MoveNext())
            {
                if (enumerator.Current.Location.Start.Line < FirstLine)
                {
                    FirstLine = enumerator.Current.Location.Start.Line;
                }
                if (enumerator.Current.Location.End.Line > LastLine)
                {
                    LastLine = enumerator.Current.Location.End.Line;
                }
            }

            enumerator = ParseErrors.GetEnumerator();
            while (enumerator.MoveNext())
            {
                if (enumerator.Current.Location.Start.Line < FirstLine)
                {
                    FirstLine = enumerator.Current.Location.Start.Line;
                }
                if (enumerator.Current.Location.End.Line > LastLine)
                {
                    LastLine = enumerator.Current.Location.End.Line;
                }
            }
        }