Example #1
0
		public void ReplaceInList(documentation_comment_section el, documentation_comment_section newel)
		{
			sections[FindIndexInList(el)] = newel;
		}
Example #2
0
		public void ReplaceInList(documentation_comment_section el, IEnumerable<documentation_comment_section> newels)
		{
			var ind = FindIndexInList(el);
			sections.RemoveAt(ind);
			sections.InsertRange(ind, newels);
		}
Example #3
0
 public void visit(documentation_comment_section _documentation_comment_section)
 {
     throw new NotImplementedException();
 }
Example #4
0
		public bool Remove(documentation_comment_section el)
		{
			return sections.Remove(el);
		}
Example #5
0
        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);
		}
Example #7
0
		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();
			}
		}
Example #9
0
		// Конструкторы списка
		public documentation_comment_list(documentation_comment_section elem, SourceContext sc = null)
		{
			Add(elem, sc);
		}
Example #10
0
		// Методы списка
		public documentation_comment_list Add(documentation_comment_section elem, SourceContext sc = null)
		{
			sections.Add(elem);
			if (sc != null)
				source_context = sc;
			return this;
		}
Example #11
0
		public documentation_comment_list Add(documentation_comment_section _documentation_comment_section, SourceContext sc)
		{
		    sections.Add(_documentation_comment_section);
		    source_context = sc;
		    return this;
		}
Example #12
0
		public documentation_comment_list Add(documentation_comment_section _documentation_comment_section)
		{
		    sections.Add(_documentation_comment_section);
		    return this;
		}
Example #13
0
		public documentation_comment_list(documentation_comment_section _documentation_comment_section, SourceContext sc)
		{
		    Add(_documentation_comment_section,sc);
		}
Example #14
0
 public override void visit(documentation_comment_section node)
 {
     prepare_collection(node.tags,"tags");
 }
Example #15
0
		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);
		}
Example #17
0
		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();
 }
Example #19
0
		public void InsertBefore(documentation_comment_section el, documentation_comment_section newel)
		{
			sections.Insert(FindIndex(el), newel);
		}
Example #20
0
 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;
 }
Example #21
0
		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);
			}
		}
Example #23
0
 public override void visit(documentation_comment_section node)
 {
     if (node.text != null)
         text = node.text;
 }