internal void AddType(string n, string super, bool silent = false) { if (String.IsNullOrEmpty(n)) { return; } if (Types.Count == 0) { TopType = n; Console.WriteLine($"[A2B] Top type is assumed to be {TopType}"); } if (Types.ContainsKey(n)) { if (!silent) { Console.WriteLine($"[A2B] Cannot add type '{n}' the second time"); } return; } var tp = new TypePlan(n) { Super = super }; Console.WriteLine($"[A2B] Added type '{n}' to the plan"); Types[tp.Name] = tp; }
public TypePlan Copy(bool turnIntoList = false) { var plan = new TypePlan(Name) { Super = Super, IsList = IsList || turnIntoList }; // do not copy constructors! return(plan); }