protected void BuildField(ClassType classType, FieldInfo fieldInfo) { var fieldType = storage.GetType(ConvertMSILNames(fieldInfo.FieldType)); if (fieldType != null) { classType.AddField(fieldInfo.Name, fieldType); } }
private void Visit(ClassDefNode node, CodegenContext context) { var type = types.GetType(node.Name) as ClassType; context.CurrentClass = type; var classBuilder = builder.BuildClass(type); foreach (var item in node.Defs) { Visit(item, classBuilder, context); } }
private void BuildType(System.Type type) { if (type.IsGenericType) { var genericTemplate = storage.GetTemplate(type.Name); genericLoader.Build(genericTemplate, type); } else { var typeInfo = storage.GetType(type.Name); if (type.IsAbstract) { packageLoader.Build(typeInfo as PackageType, type); } else { classLoader.Build(typeInfo as ClassType, type); } } }
private TypeInfo Visit(TypeNode node) { return(types.GetType(node.TypeName)); }