-
Notifications
You must be signed in to change notification settings - Fork 4
Resolvendo Problema com Gerador de Código JAVA #107
Resolvendo Problema com Gerador de Código JAVA #107
Conversation
@@ -138,7 +140,11 @@ private Programa geraPrograma(ASAPrograma asa, ResultadoAnalise resultadoAnalise | |||
GeradorCodigoJava.Opcoes opcoes = new GeradorCodigoJava.Opcoes(true, true, true); | |||
gerador.gera(asa, writerArquivoJava, nomeClasse, opcoes); | |||
writerArquivoJava.flush(); | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlissonSteffens , essa alteração aqui não tem relação com o PR ou a issue que o PR está resolvendo. Para resolver essa issue bastaria alterar a classe Utils. Porque você fez estas outras alterações?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isso é um codigo para testar o codigo java gerado, e faz sentido para as próximas alterações no gerador
if (!valores.isEmpty() && !valores.get(0).isEmpty()) | ||
{ | ||
Object valor = valores.get(0).get(0); | ||
if (valor instanceof NoExpressaoLiteral) | ||
{ | ||
return ((NoExpressaoLiteral)valor).getTipoResultante(); | ||
} | ||
else if(valor instanceof NoReferencia){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isso faz sentido nesse PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elieserdejesus, faz sentido sim. Esta linha conserta um bug que estava ocorrendo ao gerar o código Java de um exemplo que o @AdsonEsteves criou.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok @noschang.
Testes unitários: |
No description provided.