This commit is contained in:
Lucas 2024-05-31 09:58:07 +02:00
parent dd424cda99
commit 5a28d88f6a
3 changed files with 7 additions and 12 deletions

View File

@ -66,19 +66,14 @@ public class Main {
printAST(abstractSyntaxTree, 0); printAST(abstractSyntaxTree, 0);
System.out.println(); System.out.println();
/* /*------------------------- Semantic Analyzer -> Tast -------------------------*/
* ------------------------- Semantic Analyzer -> Tast -------------------------
*/
SemanticAnalyzer.generateTast(abstractSyntaxTree); SemanticAnalyzer.generateTast(abstractSyntaxTree);
ProgramNode typedAst = (ProgramNode) SemanticAnalyzer.generateTast(abstractSyntaxTree); ProgramNode typedAst = (ProgramNode) SemanticAnalyzer.generateTast(abstractSyntaxTree);
// Printing the Tast // Printing the Tast
System.out.println("Tast generated"); System.out.println("Tast generated");
/* /*------------------------- Bytecode Generator -> Bytecode -------------------------*/
* ------------------------- Bytecode Generator -> Bytecode
* -------------------------
*/
ByteCodeGenerator byteCodeGenerator = new ByteCodeGenerator(); ByteCodeGenerator byteCodeGenerator = new ByteCodeGenerator();
//byteCodeGenerator.generateByteCode(abstractSyntaxTree); //byteCodeGenerator.generateByteCode(abstractSyntaxTree);
byteCodeGenerator.visit(typedAst); byteCodeGenerator.visit(typedAst);