Skip to content
Snippets Groups Projects
Commit e26c5283 authored by lucien.noel's avatar lucien.noel
Browse files

petites corrections et maintenant tous les tests passent

parent 3138bd4c
No related branches found
No related tags found
No related merge requests found
......@@ -372,7 +372,7 @@ public class SemanticAnalyzer implements ASTVisitor {
*/
private boolean isExpressionNumber(Expression expr) {
expr = (expr instanceof Parentheses)?((Parentheses)expr).getExpression():expr;
return expr instanceof Nombre || expr instanceof Arithmetique || (expr instanceof Idf
return expr instanceof Nombre || expr instanceof Arithmetique || expr instanceof Moins || (expr instanceof Idf
&& TDS.getInstance().identifier(new Entree(((Idf) expr).getNom())).getType() instanceof Entier);
}
......@@ -384,7 +384,7 @@ public class SemanticAnalyzer implements ASTVisitor {
*/
private boolean isExpressionBooleen(Expression expr) {
expr = (expr instanceof Parentheses)?((Parentheses)expr).getExpression():expr;
return expr instanceof Vrai || expr instanceof Faux || expr instanceof Relation || (expr instanceof Idf
return expr instanceof Vrai || expr instanceof Faux || expr instanceof Relation || expr instanceof Non || expr instanceof Et || expr instanceof Ou || (expr instanceof Idf
&& TDS.getInstance().identifier(new Entree(((Idf) expr).getNom())).getType() instanceof Booleen);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment