Пример #1
0
 void ConvertPasRecordTypeDecl(PasRecordTypeDecl pasRecord, CsNamespace csNamespace)
 {
     var csStruct = new CsStructTypeDecl();
     csStruct.Name = pasRecord.Name;
     foreach (var pasVar in pasRecord.Vars)
         ConvertPasDecl(pasVar, csStruct);
     csNamespace.Decls.Add(csStruct);
     _associations.Assign(pasRecord, csStruct);
 }
Пример #2
0
 void ConvertPasVarDecl(PasVarDecl pasVar, CsStructTypeDecl csStruct)
 {
     var csVar = new CsField();
     csVar.Name = pasVar.Name;
     csVar.TypeRef = ConvertPasTypeRef(pasVar.TypeRef);
     csStruct.Decls.Add(csVar);
     _associations.Assign(pasVar, csVar);
 }
Пример #3
0
 void ConvertPasDecl(PasDecl pasDecl, CsStructTypeDecl csStruct)
 {
     if (pasDecl is PasVarDecl)
         ConvertPasVarDecl(pasDecl as PasVarDecl, csStruct);
     else
         throw new Exception(string.Format("Tipo desconhecido: {0}", pasDecl.GetType().Name));
 }