Modifier and Type | Field and Description |
---|---|
protected @NotNull java.util.List<Compiler> |
compilers
The compilers backing this compiler.
|
Constructor and Description |
---|
FirstCompileCompiler(Compiler... compilers)
Construct a new order-compiler that uses the given
compilers . |
FirstCompileCompiler(@NotNull java.util.List<Compiler> compilers)
Construct a new order-compiler that uses the given
compilers . |
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. |
@NotNull protected final @NotNull java.util.List<Compiler> compilers
public FirstCompileCompiler(@Nullable Compiler... compilers)
compilers
.
compilers
- the compilers (in-order) to be used by the constructed compiler.java.lang.NullPointerException
- if the given compilers
is null.public FirstCompileCompiler(@NotNull @NotNull java.util.List<Compiler> compilers)
compilers
.
compilers
- the compilers (in-order) to be used by the constructed compiler.java.lang.NullPointerException
- if the given compilers
is null.@Nullable public @Nullable Instruction compile(@NotNull @NotNull Compiler compiler, @NotNull @NotNull Compilation compilation, @NotNull @NotNull Tree tree)
Compiler
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.compile
in interface 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.