// Path: src/main/java/com/pidanic/saral/domain/Init.java
// public class Init {
//     private List<Statement> instructions;
//     private Scope scope;
// 
//     public Init(Scope scope, List<Statement> instructions) {
//         this.instructions = instructions;
//         this.scope = scope;
//     }
// 
//     public List<Statement> getStatements() {
//         return instructions;
//     }
// 
//     public void accept(InitGenerator generator) {
//         generator.generate(this);
//     }
// 
//     public Scope getScope() {
//         return scope;
//     }
// }
// 
// Path: src/main/java/com/pidanic/saral/generator/ByteCodeGenerator.java
// public class ByteCodeGenerator {
//     private static final int CLASS_VERSION = 54;
// 
//     public byte[] generateByteCode(Init compilationUnit) {
//         String name = compilationUnit.getScope().getClassName();
//         ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES + ClassWriter.COMPUTE_MAXS);
// 
//         cw.visit(CLASS_VERSION, Opcodes.ACC_PUBLIC + Opcodes.ACC_SUPER, name, null, "java/lang/Object", null);
// 
//         InitGenerator initGenerator = new InitGenerator(cw);
//         return initGenerator.generate(compilationUnit).toByteArray();
//     }
// }


import com.pidanic.saral.domain.Init;
import com.pidanic.saral.generator.ByteCodeGenerator;
import java.io.*;
import java.nio.file.Files;
package com.pidanic.saral;



public class Compiler {
    public static void main(String[] args) {
        new Compiler().compile(args);
    }

    public void compile(String[] args) {
        File file = new File(args[0]);
        String fileName = file.getName();
        String className = fileName.substring(0, fileName.lastIndexOf('.'));
        try {
            File preprocessedTempFile = new Preprocessor().preprocess(file);

// Path: src/main/java/com/pidanic/saral/domain/Init.java
// public class Init {
//     private List<Statement> instructions;
//     private Scope scope;
// 
//     public Init(Scope scope, List<Statement> instructions) {
//         this.instructions = instructions;
//         this.scope = scope;
//     }
// 
//     public List<Statement> getStatements() {
//         return instructions;
//     }
// 
//     public void accept(InitGenerator generator) {
//         generator.generate(this);
//     }
// 
//     public Scope getScope() {
//         return scope;
//     }
// }
// 
// Path: src/main/java/com/pidanic/saral/generator/ByteCodeGenerator.java
// public class ByteCodeGenerator {
//     private static final int CLASS_VERSION = 54;
// 
//     public byte[] generateByteCode(Init compilationUnit) {
//         String name = compilationUnit.getScope().getClassName();
//         ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES + ClassWriter.COMPUTE_MAXS);
// 
//         cw.visit(CLASS_VERSION, Opcodes.ACC_PUBLIC + Opcodes.ACC_SUPER, name, null, "java/lang/Object", null);
// 
//         InitGenerator initGenerator = new InitGenerator(cw);
//         return initGenerator.generate(compilationUnit).toByteArray();
//     }
// }


// Path: src/main/java/com/pidanic/saral/Compiler.java
import com.pidanic.saral.domain.Init;
import com.pidanic.saral.generator.ByteCodeGenerator;
import java.io.*;
import java.nio.file.Files;

package com.pidanic.saral;



public class Compiler {
    public static void main(String[] args) {
        new Compiler().compile(args);
    }

    public void compile(String[] args) {
        File file = new File(args[0]);
        String fileName = file.getName();
        String className = fileName.substring(0, fileName.lastIndexOf('.'));
        try {
            File preprocessedTempFile = new Preprocessor().preprocess(file);

            Init compilationUnit = new SaralCompilationUnitParser().getCompilationUnit(preprocessedTempFile, className);