void ConvertPasDecl(PasDecl pasDecl, List<CsStat> csCodes)
 {
     if (pasDecl is PasVarDecl)
         ConvertPasVarDecl(pasDecl as PasVarDecl, csCodes);
     else if (pasDecl is PasProcedureDecl)
         ConvertPasProcedureDecl(pasDecl as PasProcedureDecl, csCodes);
     else if (pasDecl is PasPointerTypeDecl)
         ConvertPasPointerTypeDecl(pasDecl as PasPointerTypeDecl, _namespace);
     else if (pasDecl is PasArrayTypeDecl)
         ConvertPasArrayTypeDecl(pasDecl as PasArrayTypeDecl, _namespace);
     else
         throw new Exception(string.Format("Tipo desconhecido: {0}", pasDecl.GetType().Name));
 }
 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));
 }
 void ConvertPasDecl(PasDecl pasDecl, CsClassTypeDecl csClass)
 {
     if (pasDecl is PasProcedureDecl)
         ConvertPasProcedureDecl(pasDecl as PasProcedureDecl, csClass, false);
     else if (pasDecl is PasProperty)
         ConvertPasPropertyDecl(csClass, pasDecl as PasProperty, false);
     else if (pasDecl is PasVarDecl)
         ConvertPasVarDecl(pasDecl as PasVarDecl, csClass, false);
     else
         throw new Exception(string.Format("Tipo desconhecido: {0}", pasDecl.GetType().Name));
 }
 void ConvertPasDecl(PasDecl pasDecl, CsNamespace csNamespace)
 {
     if (pasDecl is PasEnumTypeDecl)
         ConvertPasEnumTypeDecl(pasDecl as PasEnumTypeDecl, csNamespace);
     else if (pasDecl is PasArrayTypeDecl)
         ConvertPasArrayTypeDecl(pasDecl as PasArrayTypeDecl, csNamespace);
     else if (pasDecl is PasSetTypeDecl)
         ConvertPasSetTypeDecl(pasDecl as PasSetTypeDecl, csNamespace);
     else if (pasDecl is PasRecordTypeDecl)
         ConvertPasRecordTypeDecl(pasDecl as PasRecordTypeDecl, csNamespace);
     else if (pasDecl is PasPointerTypeDecl)
         ConvertPasPointerTypeDecl(pasDecl as PasPointerTypeDecl, csNamespace);
     else if (pasDecl is PasAliasTypeDecl)
         ConvertPasAliasTypeDecl(pasDecl as PasAliasTypeDecl, csNamespace);
     else if (pasDecl is PasStringTypeDecl)
         ConvertPasStringTypeDecl(pasDecl as PasStringTypeDecl, csNamespace);
     else if (pasDecl is PasProcedureTypeDecl)
         ConvertPasProcedureTypeDecl(pasDecl as PasProcedureTypeDecl, csNamespace);
     else if (pasDecl is PasClassTypeDecl)
         ConvertPasClassTypeDecl(pasDecl as PasClassTypeDecl, csNamespace);
     else if (pasDecl is PasMetaclassTypeDecl)
         ConvertPasMetaclassTypeDecl(pasDecl as PasMetaclassTypeDecl, csNamespace);
     else if (pasDecl is PasVarDecl)
         ConvertPasVarDecl(pasDecl as PasVarDecl, csNamespace);
     else if (pasDecl is PasConstDecl)
         ConvertPasConstDecl(pasDecl as PasConstDecl, csNamespace);
     else if (pasDecl is PasProcedureDecl)
         ConvertPasProcedureDecl(pasDecl as PasProcedureDecl, csNamespace);
     else
         throw new Exception(string.Format("Tipo desconhecido: {0}", pasDecl.GetType().Name));
 }