Exemplo n.º 1
0
		public class_members Add(declaration _declaration, SourceContext sc)
		{
		    members.Add(_declaration);
		    source_context = sc;
		    return this;
		}
Exemplo n.º 2
0
 public static class_members BuildOneMemberSection(declaration m)
 {
     var cm = new class_members(access_modifer.public_modifer);
     cm.Add(m);
     return cm;
 }
Exemplo n.º 3
0
		public void visit(declaration _declaration)
		{
			bw.Write((Int16)20);
			write_declaration(_declaration);
		}
		public void visit(declaration _declaration)
		{
			read_declaration(_declaration);
		}
Exemplo n.º 5
0
 public override void visit(declaration _declaration)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 6
0
		public bool Remove(declaration el)
		{
			return defs.Remove(el);
		}
Exemplo n.º 7
0
		public void ReplaceInList(declaration el, IEnumerable<declaration> newels)
		{
			var ind = FindIndexInList(el);
			defs.RemoveAt(ind);
			defs.InsertRange(ind, newels);
		}
Exemplo n.º 8
0
		public bool Remove(declaration el)
		{
			return members.Remove(el);
		}
Exemplo n.º 9
0
		// Конструкторы списка
		public function_lambda_definition(declaration elem, SourceContext sc = null)
		{
			Add(elem, sc);
		}
Exemplo n.º 10
0
		// Методы списка
		public class_members Add(declaration elem, SourceContext sc = null)
		{
			members.Add(elem);
			if (sc != null)
				source_context = sc;
			return this;
		}
Exemplo n.º 11
0
		public void AddFirst(declaration el)
		{
			members.Insert(0, el);
		}
Exemplo n.º 12
0
		// Конструкторы списка
		public class_members(declaration elem, SourceContext sc = null)
		{
			Add(elem, sc);
		}
Exemplo n.º 13
0
 public void CompareInternal(declaration left, declaration right)
 {
     if (left == null && right != null || left != null && right == null)
         throw_not_equal(left, right);
     if (left != null && right != null)
     {
         if (left.GetType() != right.GetType())
             throw_not_equal(left, right);
         if (left is function_header)
             CompareInternal(left as function_header, right as function_header);
         else if (left is constructor)
             CompareInternal(left as constructor, right as constructor);
         else if (left is destructor)
             CompareInternal(left as destructor, right as destructor);
         else if (left is procedure_header)
             CompareInternal(left as procedure_header, right as procedure_header);
         else if (left is procedure_definition)
             CompareInternal(left as procedure_definition, right as procedure_definition);
         else if (left is variable_definitions)
             CompareInternal(left as variable_definitions, right as variable_definitions);
         else if (left is consts_definitions_list)
             CompareInternal(left as consts_definitions_list, right as consts_definitions_list);
         else if (left is type_declarations)
             CompareInternal(left as type_declarations, right as type_declarations);
         else if (left is label_definitions)
             CompareInternal(left as label_definitions, right as label_definitions);
         else if (left is simple_property)
             CompareInternal(left as simple_property, right as simple_property);
         else if (left is var_def_statement)
             CompareInternal(left as var_def_statement, right as var_def_statement);
         else if (left is simple_const_definition)
             CompareInternal(left as simple_const_definition, right as simple_const_definition);
         else if (left is typed_const_definition)
             CompareInternal(left as typed_const_definition, right as typed_const_definition);
         else
             throw new NotImplementedException(left.GetType().ToString());
     }
 }
Exemplo n.º 14
0
 private bool need_to_parse(declaration _declaration)
 {
     if (!(_declaration is procedure_definition))
         return false;
     procedure_definition proc = _declaration as procedure_definition;
     if (proc.proc_header.name.class_name != null)
         return true;
     if (proc.proc_header.proc_attributes == null)
         return false;
     if (has_extensionmethod_attr(proc.proc_header.proc_attributes.proc_attributes))
         return true;
     return false;
 }
Exemplo n.º 15
0
		public void InsertBefore(declaration el, declaration newel)
		{
			defs.Insert(FindIndex(el), newel);
		}
Exemplo n.º 16
0
		// Методы списка
		public function_lambda_definition Add(declaration elem, SourceContext sc = null)
		{
			defs.Add(elem);
			if (sc != null)
				source_context = sc;
			return this;
		}
Exemplo n.º 17
0
		public void InsertBefore(declaration el, IEnumerable<declaration> newels)
		{
			defs.InsertRange(FindIndex(el), newels);
		}
Exemplo n.º 18
0
		// Конструкторы списка
		public declarations(declaration elem, SourceContext sc = null)
		{
			Add(elem, sc);
		}
Exemplo n.º 19
0
		public void ReplaceInList(declaration el, declaration newel)
		{
			defs[FindIndexInList(el)] = newel;
		}
Exemplo n.º 20
0
		// Методы списка
		public declarations Add(declaration elem, SourceContext sc = null)
		{
			defs.Add(elem);
			if (sc != null)
				source_context = sc;
			return this;
		}
Exemplo n.º 21
0
        public override void visit(declaration _subprogram_definition)
		{
			
		}
Exemplo n.º 22
0
		public void AddFirst(declaration el)
		{
			defs.Insert(0, el);
		}
Exemplo n.º 23
0
		public void read_declaration(declaration _declaration)
		{
			read_syntax_tree_node(_declaration);
			_declaration.attributes = _read_node() as attribute_list;
		}
Exemplo n.º 24
0
		private int FindIndexInList(declaration el)
		{
			var ind = defs.FindIndex(x => x == el);
			if (ind == -1)
				throw new Exception(string.Format("У списка {0} не найден элемент {1} среди дочерних\n", this, el));
			return ind;
		}
Exemplo n.º 25
0
 public override void visit(declaration _declaration)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 26
0
		public void InsertAfter(declaration el, declaration newel)
		{
			defs.Insert(FindIndex(el) + 1, newel);
		}
Exemplo n.º 27
0
 public declaration NewPropertyDefinition(attribute_list opt_attribute_declarations, declaration simple_property_definition, LexLocation loc)
 {
     var nnpd = simple_property_definition;
     nnpd.attributes = opt_attribute_declarations;
     nnpd.source_context = loc;
     return nnpd;
 }
Exemplo n.º 28
0
		public void InsertAfter(declaration el, IEnumerable<declaration> newels)
		{
			defs.InsertRange(FindIndex(el) + 1, newels);
		}
Exemplo n.º 29
0
		public void write_declaration(declaration _declaration)
		{
			write_syntax_tree_node(_declaration);
			if (_declaration.attributes == null)
			{
				bw.Write((byte)0);
			}
			else
			{
				bw.Write((byte)1);
				_declaration.attributes.visit(this);
			}
		}
Exemplo n.º 30
0
		public class_members Add(declaration _declaration)
		{
		    members.Add(_declaration);
		    return this;
		}