private Chan VisitChan(Chan chan) { WriteStart("chan {0} ", chan.Name.Name); this.VisitTypeReference(chan.ChannelType); WriteFinish(";"); return chan; }
private Chan VisitChan(Chan chan) { chan.ChannelType = this.VisitTypeReference(chan.ChannelType); return chan; }
private Chan VisitChan(Chan chan) { if (chan == null) return null; Chan result = (Chan)this.VisitTypeAlias(chan); return result; }
private Chan VisitChan(Chan chan) { TypeNode tNode = this.VisitTypeExpression((TypeExpression)chan.ChannelType); chan.ChannelType = tNode; return chan; }
private Chan VisitChan(Chan chan) { if (chan == null) return null; chan.ChannelType = this.VisitTypeReference(chan.ChannelType); return chan; }
private void GenerateChan(Chan chanNode) { Expression ns = null; string chanStyle = null; switch (GetTypeClassification(chanNode.ChannelType)) { case TypeClassification.Simple: ns = chanNode.ChannelType.Namespace; chanStyle = "SimpleChan"; break; case TypeClassification.Enum: chanStyle = "EnumChan"; break; case TypeClassification.Struct: chanStyle = "StructChan"; break; case TypeClassification.Heap: if (chanNode.ChannelType == SystemTypes.Object) ns = chanNode.ChannelType.Namespace; chanStyle = "ComplexChan"; break; } Class chanClass = (Class)Templates.GetTypeTemplateByName(chanStyle); if (ns == null) ns = new QualifiedIdentifier(new Identifier("Microsoft.Zing"), new Identifier("Application")); Replacer.Replace(chanClass, chanStyle, chanNode.Name); Replacer.Replace(chanClass, "_ElementType", new QualifiedIdentifier(ns, chanNode.ChannelType.Name)); SetTypeId(chanClass); InstallType(chanClass); }