added Semanticcheck to main
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
Bruder John 2024-07-03 18:24:02 +02:00
parent 3e0e6f8327
commit 7ccff3208c

View File

@ -96,6 +96,7 @@ public class Main {
// Log the typed AST // Log the typed AST
RaupenLogger.logSemanticAnalyzer(typedAst); RaupenLogger.logSemanticAnalyzer(typedAst);
if(SemanticAnalyzer.errors.isEmpty()){
/*------------------------- Bytecode Generator -> Bytecode -------------------------*/ /*------------------------- Bytecode Generator -> Bytecode -------------------------*/
// Use the ByteCodeGenerator to generate bytecode from the typed AST and output it to the specified directory // Use the ByteCodeGenerator to generate bytecode from the typed AST and output it to the specified directory
@ -107,5 +108,12 @@ public class Main {
byteCodeGenerator.visit((ProgramNode) typedAst); byteCodeGenerator.visit((ProgramNode) typedAst);
// Log the bytecode generation // Log the bytecode generation
RaupenLogger.logBytecodeGenerator(); RaupenLogger.logBytecodeGenerator();
} else {
for(Exception exception : SemanticAnalyzer.errors){
exception.printStackTrace();
}
}
} }
} }