src/main/java/xelfi/compiler/XelfiCompilerMain.java
author Jaroslav Tulach <jaroslav.tulach@xelfi.cz>
Tue, 17 Jan 2017 21:12:37 +0100
branchDirtyFix
changeset 10 fe294d0f1297
parent 5 2c326fbd80f2
child 15 cdb47e644581
permissions -rw-r--r--
Making the project compilable
     1 /** XelfiCompilerMain class
     2 * @author: Filip Dvorak
     3 * @version: 1.3
     4 */
     5 
     6 package xelfi.compiler;
     7 
     8 import java.io.*;
     9 
    10 
    11 class XelfiCompilerMain extends Object implements MainCompiler
    12 {
    13     /** Output from compiler is send here. */
    14   protected XelfiCompilerOutput out;
    15 
    16   XelfiCompilerMain(XelfiCompilerOutput o)
    17   {
    18     out = o;
    19   }
    20 
    21   public void compileClass(File file)
    22   {
    23     String args[] = null;
    24     if(CompilerOptions.getUseGparam())
    25     {
    26       args = new String[2];
    27       args[0] = "-g";
    28       args[1] = file.toString();
    29       output("Compiling: " + args[0] + " " + args[1]);
    30     }
    31     else
    32     {
    33       args = new String[1];
    34       args[0] = file.toString();
    35       output("Compiling: " + args[0]);
    36     }
    37 //    compile(args);
    38     output("\n");
    39   }
    40 
    41   public void error(String err)
    42   {
    43     out.topLevelError(err);
    44   }
    45 
    46   public void output(String msg)
    47   {
    48     out.topLevelOutput(msg);
    49   }
    50 }