Esempio n. 1
0
 private void OnName(object sender, ActionEventArgs args)
 {
     // Start a new attribute, ready for another pass
     m_Attribute      = new Attribute();
     m_Attribute.Name = new Name(args.Value);
     Module.AddName(m_Attribute.Name);
 }
Esempio n. 2
0
        public void AddEntry(string str_name, int value)
        {
            // Make sure the name is registered with the main module
            Name name = new Name(str_name);

            Module.AddName(name);

            // Add the entry
            Entry entry = new Entry();

            entry.Name  = name;
            entry.Value = value;
            Entries.Add(entry);
        }
Esempio n. 3
0
        public Scope(Scope parent_scope, string name)
        {
            ParentScope = parent_scope;
            Name        = new Name(name);
            FullName    = new Name(name);

            if (name != "")
            {
                // Determine full name by ignoring the root global scope
                if (ParentScope != null && ParentScope.ParentScope != null)
                {
                    FullName = new Name(ParentScope.ConstructFullName(name));
                }

                Module.AddName(Name);

                if (Name.String != FullName.String)
                {
                    Module.AddName(FullName);
                }
            }
        }