public void ReplaceInList(documentation_comment_section el, documentation_comment_section newel) { sections[FindIndexInList(el)] = newel; }
public void ReplaceInList(documentation_comment_section el, IEnumerable<documentation_comment_section> newels) { var ind = FindIndexInList(el); sections.RemoveAt(ind); sections.InsertRange(ind, newels); }
public void visit(documentation_comment_section _documentation_comment_section) { throw new NotImplementedException(); }
public bool Remove(documentation_comment_section el) { return sections.Remove(el); }
public override void visit(documentation_comment_section _documentation_comment_section) { }
public void visit(documentation_comment_section _documentation_comment_section) { bw.Write((Int16)176); write_documentation_comment_section(_documentation_comment_section); }
public void AddFirst(documentation_comment_section el) { sections.Insert(0, el); }
public void read_documentation_comment_section(documentation_comment_section _documentation_comment_section) { read_syntax_tree_node(_documentation_comment_section); if (br.ReadByte() == 0) { _documentation_comment_section.tags = null; } else { _documentation_comment_section.tags = new List<documentation_comment_tag>(); Int32 ssyy_count = br.ReadInt32(); for(Int32 ssyy_i = 0; ssyy_i < ssyy_count; ssyy_i++) { _documentation_comment_section.tags.Add(_read_node() as documentation_comment_tag); } } if (br.ReadByte() == 0) { _documentation_comment_section.text = null; } else { _documentation_comment_section.text = br.ReadString(); } }
// Конструкторы списка public documentation_comment_list(documentation_comment_section elem, SourceContext sc = null) { Add(elem, sc); }
// Методы списка public documentation_comment_list Add(documentation_comment_section elem, SourceContext sc = null) { sections.Add(elem); if (sc != null) source_context = sc; return this; }
public documentation_comment_list Add(documentation_comment_section _documentation_comment_section, SourceContext sc) { sections.Add(_documentation_comment_section); source_context = sc; return this; }
public documentation_comment_list Add(documentation_comment_section _documentation_comment_section) { sections.Add(_documentation_comment_section); return this; }
public documentation_comment_list(documentation_comment_section _documentation_comment_section, SourceContext sc) { Add(_documentation_comment_section,sc); }
public override void visit(documentation_comment_section node) { prepare_collection(node.tags,"tags"); }
private int FindIndexInList(documentation_comment_section el) { var ind = sections.FindIndex(x => x == el); if (ind == -1) throw new Exception(string.Format("У списка {0} не найден элемент {1} среди дочерних\n", this, el)); return ind; }
public void visit(documentation_comment_section _documentation_comment_section) { read_documentation_comment_section(_documentation_comment_section); }
public void InsertAfter(documentation_comment_section el, documentation_comment_section newel) { sections.Insert(FindIndex(el) + 1, newel); }
public override void visit(documentation_comment_section node) { throw new NotImplementedException(); }
public void InsertBefore(documentation_comment_section el, documentation_comment_section newel) { sections.Insert(FindIndex(el), newel); }
documentation_comment_section parse_section(string text) { documentation_comment_section dcs = new documentation_comment_section(); text = Regex.Replace(text, @"\r\n(\s)*'''", "\r\n", RegexOptions.Compiled); text = Regex.Replace(text, @"(\s)*'''", "", RegexOptions.Compiled); /*foreach (string section_name in sectionNames) { string pattern = "<" + section_name + @"(\w+='\w+')*>" + "(.|\r\n)*" + "</" + section_name + ">"; MatchCollection mc = Regex.Matches(text, pattern, RegexOptions.Compiled | RegexOptions.IgnoreCase); foreach (Match m in mc) { documentation_comment_tag dt = new documentation_comment_tag(); dt.name = section_name; string res = m.Value; int i = res.IndexOf('>'); dt.text = res.Substring(i + 1, res.IndexOf("</" + section_name) - i - 1); dcs.tags.Add(dt); } }*/ dcs.text = text; return dcs; }
public void InsertBefore(documentation_comment_section el, IEnumerable<documentation_comment_section> newels) { sections.InsertRange(FindIndex(el), newels); }
public void write_documentation_comment_section(documentation_comment_section _documentation_comment_section) { write_syntax_tree_node(_documentation_comment_section); if (_documentation_comment_section.tags == null) { bw.Write((byte)0); } else { bw.Write((byte)1); bw.Write(_documentation_comment_section.tags.Count); for(Int32 ssyy_i = 0; ssyy_i < _documentation_comment_section.tags.Count; ssyy_i++) { if (_documentation_comment_section.tags[ssyy_i] == null) { bw.Write((byte)0); } else { bw.Write((byte)1); _documentation_comment_section.tags[ssyy_i].visit(this); } } } if (_documentation_comment_section.text == null) { bw.Write((byte)0); } else { bw.Write((byte)1); bw.Write(_documentation_comment_section.text); } }
public override void visit(documentation_comment_section node) { if (node.text != null) text = node.text; }