Ejemplo 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;
 }
        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;
        }
        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);
        }
 public Symbol Add(string name, IrisType type, StorageClass storage, ImportedMember importInfo = null)
 {
     int location = GetNextLocation(storage, type);
     return Add(name, type, storage, location, importInfo);
 }