@FunctionalInterface
public interface Compiler
Trees into Instructions
depending on the state of the trees and compilations provided to it.| Modifier and Type | Method and Description |
|---|---|
@Nullable Instruction |
compile(@NotNull Compiler compiler,
@NotNull Compilation compilation,
@NotNull Tree tree)
Compile the given
tree and the trees in it. |
@Nullable @Contract(pure=true) @Nullable Instruction compile(@NotNull @NotNull Compiler compiler, @NotNull @NotNull Compilation compilation, @NotNull @NotNull Tree tree)
tree and the trees in it. If this compiler cannot If this
compiler encountered a tree that it cannot compile, this compiler will pass it to
the given fallback compiler with the given compiler as the fallback
compiler.
compiler with itself as the default compiler.compiler - a compiler this compiler must use when dealing with other
entities this compiler cannot compile.compilation - the compilation the given tree was taken from.tree - the tree to parse any instruction in it.null if this compiler failed to
compile the given tree into an instruction.java.lang.NullPointerException - if the given compiler or tree or
executable or compiler is null.CompileException - if this compiler detected a wrong unforgivable pattern
in the given tree;java.io.IOError - if any I/O error occurs.