Modifier and Type | Field and Description |
---|---|
protected @NotNull Compiler |
compiler
The fallback compiler.
|
protected @NotNull Compiler |
fallback
The fallback compiler.
|
Constructor and Description |
---|
ExclusiveCompiler(@NotNull Compiler compiler)
Construct a new exclusive compiler that compiles using the given
compiler
with itself as the fallback compiler (ignoring the fallback compiler given to it). |
ExclusiveCompiler(@NotNull Compiler compiler,
@NotNull Compiler fallback)
Construct a new exclusive compiler that compiles using the given
compiler
with the given fallback compiler as the fallback compiler (ignoring the
fallback compiler given 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. |
@NotNull protected final @NotNull Compiler compiler
@NotNull protected final @NotNull Compiler fallback
public ExclusiveCompiler(@NotNull @NotNull Compiler compiler)
compiler
with itself as the fallback compiler (ignoring the fallback compiler given to it).compiler
- the wrapped compiler.java.lang.NullPointerException
- if the given compiler
is null.public ExclusiveCompiler(@NotNull @NotNull Compiler compiler, @NotNull @NotNull Compiler fallback)
compiler
with the given fallback
compiler as the fallback compiler (ignoring the
fallback compiler given to it).compiler
- the wrapped compiler.fallback
- the fallback compiler to be passed to the given compiler
.@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.