2 // namespace.cs: Tracks namespaces
5 // Miguel de Icaza (miguel@ximian.com)
7 // (C) 2001 Ximian, Inc.
10 using System.Collections;
13 namespace Mono.MonoBASIC {
16 /// Keeps track of the namespaces defined in the C# code.
18 public class Namespace {
19 static ArrayList all_namespaces = new ArrayList ();
25 /// Constructor Takes the current namespace and the
26 /// name. This is bootstrapped with parent == null
29 public Namespace (Namespace parent, string name)
34 all_namespaces.Add (this);
38 /// The qualified name of the current namespace
42 string pname = parent != null ? parent.Name : "";
47 return parent.Name + "." + name;
52 /// The parent of this namespace, used by the parser to "Pop"
53 /// the current namespace declaration
55 public Namespace Parent {
62 /// Show the qualified name of the namespace contained here
64 public override string ToString() {