Esempio n. 1
0
        private static FieldDefinition GenerateField(AssemblyDefinition assembly, TypeParser type)
        {
            TypeDefinition fieldType  = type.GenerateType(assembly, type.Version);
            string         fieldName  = type.IsArray ? fieldType.Fields[1].Name : type.VarName;
            bool           fieldAlign = type.MetaFlag.IsAlign();

            return(new FieldDefinition(fieldType, fieldName, fieldAlign));
        }
Esempio n. 2
0
        private static FieldDefinition GenerateField(AssemblyDefinition assembly, TypeParser child)
        {
            if (child.TypeName == "Array")
            {
                return(GenerateField(assembly, child.Children[1]));
            }

            TypeDefinition  childType = child.GenerateType(assembly);
            FieldDefinition field     = new FieldDefinition();

            field.Name    = child.VarName;
            field.Type    = childType;
            field.IsArray = child.TypeName == "vector";
            field.IsAlign = child.MetaFlag.IsAlign();
            return(field);
        }