public class_members Add(declaration _declaration, SourceContext sc) { members.Add(_declaration); source_context = sc; return this; }
public static class_members BuildOneMemberSection(declaration m) { var cm = new class_members(access_modifer.public_modifer); cm.Add(m); return cm; }
public void visit(declaration _declaration) { bw.Write((Int16)20); write_declaration(_declaration); }
public void visit(declaration _declaration) { read_declaration(_declaration); }
public override void visit(declaration _declaration) { throw new Exception("The method or operation is not implemented."); }
public bool Remove(declaration el) { return defs.Remove(el); }
public void ReplaceInList(declaration el, IEnumerable<declaration> newels) { var ind = FindIndexInList(el); defs.RemoveAt(ind); defs.InsertRange(ind, newels); }
public bool Remove(declaration el) { return members.Remove(el); }
// Конструкторы списка public function_lambda_definition(declaration elem, SourceContext sc = null) { Add(elem, sc); }
// Методы списка public class_members Add(declaration elem, SourceContext sc = null) { members.Add(elem); if (sc != null) source_context = sc; return this; }
public void AddFirst(declaration el) { members.Insert(0, el); }
// Конструкторы списка public class_members(declaration elem, SourceContext sc = null) { Add(elem, sc); }
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()); } }
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; }
public void InsertBefore(declaration el, declaration newel) { defs.Insert(FindIndex(el), newel); }
// Методы списка public function_lambda_definition Add(declaration elem, SourceContext sc = null) { defs.Add(elem); if (sc != null) source_context = sc; return this; }
public void InsertBefore(declaration el, IEnumerable<declaration> newels) { defs.InsertRange(FindIndex(el), newels); }
// Конструкторы списка public declarations(declaration elem, SourceContext sc = null) { Add(elem, sc); }
public void ReplaceInList(declaration el, declaration newel) { defs[FindIndexInList(el)] = newel; }
// Методы списка public declarations Add(declaration elem, SourceContext sc = null) { defs.Add(elem); if (sc != null) source_context = sc; return this; }
public override void visit(declaration _subprogram_definition) { }
public void AddFirst(declaration el) { defs.Insert(0, el); }
public void read_declaration(declaration _declaration) { read_syntax_tree_node(_declaration); _declaration.attributes = _read_node() as attribute_list; }
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; }
public override void visit(declaration _declaration) { throw new NotImplementedException(); }
public void InsertAfter(declaration el, declaration newel) { defs.Insert(FindIndex(el) + 1, newel); }
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; }
public void InsertAfter(declaration el, IEnumerable<declaration> newels) { defs.InsertRange(FindIndex(el) + 1, newels); }
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); } }
public class_members Add(declaration _declaration) { members.Add(_declaration); return this; }