Beispiel #1
0
        private DocItem ReadDocItem(string name, string[] lines, ref int idx)
        {
            var item = new DocItem { Header = name };

            for (; idx < lines.Length; idx++)
            {
                var lt = lines[idx].TrimStart();

                if (ReadPragma("#", lt) != null)
                {
                    idx--;
                    return item;
                }
                else
                    item.Lines.Add(ReadLine(lt));
            }

            return item;
        }
Beispiel #2
0
        private DocItem ReadDocItem(string name, string[] lines, ref int idx)
        {
            var item = new DocItem {
                Header = name
            };

            for (; idx < lines.Length; idx++)
            {
                var lt = lines[idx].TrimStart();

                if (ReadPragma("#", lt) != null)
                {
                    idx--;
                    return(item);
                }
                else
                {
                    item.Lines.Add(ReadLine(lt));
                }
            }

            return(item);
        }
Beispiel #3
0
        private void ReadMembers(Doc d, string[] lines, int idx)
        {
            var item = default(DocItem);

            for (var i = idx; i < lines.Length; i++)
            {
                var lt = lines[i].TrimStart();

                if (lt.Length == 0)
                {
                    if (item != null)
                    {
                        d.Items.Add(item);
                    }

                    item = null;
                }
                else
                {
                    if (item == null)
                    {
                        item        = new DocItem();
                        item.Header = lt;
                    }
                    else
                    {
                        item.Lines.Add(ReadLine(lt));
                    }
                }
            }

            if (item != null)
            {
                d.Items.Add(item);
            }
        }
Beispiel #4
0
        private void ReadMembers(Doc d, string[] lines, int idx)
        {
            var item = default(DocItem);

            for (var i = idx; i < lines.Length; i++)
            {
                var lt = lines[i].TrimStart();

                if (lt.Length == 0)
                {
                    if (item != null)
                        d.Items.Add(item);

                    item = null;
                }
                else
                {
                    if (item == null)
                    {
                        item = new DocItem();
                        item.Header = lt;
                    }
                    else
                        item.Lines.Add(ReadLine(lt));
                }
            }

            if (item != null)
                d.Items.Add(item);
        }