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

petites corrections

parent 333d2b9f
No related branches found
No related tags found
No related merge requests found
import java.util.LinkedHashMap;
/* /*
* Represent a function declaration instruction node inside the AST. * Represent a function declaration instruction node inside the AST.
*/ */
......
This diff is collapsed.
...@@ -82,7 +82,7 @@ public class SemanticAnalyzer implements ASTVisitor { ...@@ -82,7 +82,7 @@ public class SemanticAnalyzer implements ASTVisitor {
return null; return null;
} }
// public Object visit(Relation node) { return null; } public Object visit(Relation node) { return null; }
public Object visit(Soustraction node) { public Object visit(Soustraction node) {
return null; return null;
...@@ -94,7 +94,7 @@ public class SemanticAnalyzer implements ASTVisitor { ...@@ -94,7 +94,7 @@ public class SemanticAnalyzer implements ASTVisitor {
public Object visit(Tantque node) { return null; } public Object visit(Tantque node) { return null; }
// public Object visit(Unaire node) { return null; } public Object visit(Unaire node) { return null; }
public Object visit(Vrai node) { return null; } public Object visit(Vrai node) { return null; }
} }
...@@ -85,8 +85,7 @@ public class SourceCodeGenerator implements ASTVisitor { ...@@ -85,8 +85,7 @@ public class SourceCodeGenerator implements ASTVisitor {
} }
public Object visit(DeclarationConstant node) { public Object visit(DeclarationConstant node) {
Symbole sym = TDS.getInstance().identifier(new Symbole sym = TDS.getInstance().identifier(new Entree(node.getIdentifier().getNom()));
Entree(node.getIdentifier().getNom()));
code += sym + " "; code += sym + " ";
node.getIdentifier().accept(this); node.getIdentifier().accept(this);
...@@ -108,8 +107,7 @@ public class SourceCodeGenerator implements ASTVisitor { ...@@ -108,8 +107,7 @@ public class SourceCodeGenerator implements ASTVisitor {
} }
public Object visit(DeclarationVariable node) { public Object visit(DeclarationVariable node) {
Symbole sym = TDS.getInstance().identifier(new Symbole sym = TDS.getInstance().identifier(new Entree(node.getIdentifier().getNom()));
Entree(node.getIdentifier().getNom()));
code += sym + " "; code += sym + " ";
node.getIdentifier().accept(this); node.getIdentifier().accept(this);
...@@ -215,7 +213,6 @@ public class SourceCodeGenerator implements ASTVisitor { ...@@ -215,7 +213,6 @@ public class SourceCodeGenerator implements ASTVisitor {
return null; return null;
} }
public Object visit(Pour node) { public Object visit(Pour node) {
code += "pour "; code += "pour ";
node.getIteratorName().accept(this); node.getIteratorName().accept(this);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment