Esempio n. 1
0
 internal Symbol(string name, IrisType type, StorageClass storage, int location, ImportedMember importInfo)
 {
     Name         = name;
     Type         = type;
     StorageClass = storage;
     Location     = location;
     ImportInfo   = importInfo;
 }
Esempio n. 2
0
        private static void AppendImportedMemberName(StringBuilder builder, ImportedMember member)
        {
            ImportedType declaringType = member.DeclaringType;

            builder.Append('[');
            builder.Append(declaringType.Module.AssemblyName);
            builder.Append(']');
            builder.Append(declaringType.FullName);
            builder.Append("::");
            builder.Append(member.Name);
        }
Esempio n. 3
0
        public Symbol Add(string name, IrisType type, StorageClass storage, ImportedMember importInfo = null)
        {
            int location = GetNextLocation(storage, type);

            return(Add(name, type, storage, location, importInfo));
        }
Esempio n. 4
0
        public Symbol Add(string name, IrisType type, StorageClass storage, int location, ImportedMember importInfo = null)
        {
            Symbol symbol = new Symbol(name, type, storage, location, importInfo);

            if (storage == StorageClass.Global)
            {
                _global.Add(name, symbol);
            }
            else
            {
                _local.Add(name, symbol);
            }

            return(symbol);
        }