public class FlattenCompiler extends java.lang.Object implements Compiler
Modifier and Type | Field and Description |
---|---|
protected @NotNull Compiler |
compiler
The compiler to be used.
|
protected @NotNull Compiler |
fallBack
The compiler used by this compiler to compile the non-reserved ranges.
|
Constructor and Description |
---|
FlattenCompiler(@NotNull Compiler compiler,
@NotNull Compiler fallBack)
Construct a new strict compiler that compiles the unreserved ranges using the given
fallback compiler. |
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 FlattenCompiler(@NotNull @NotNull Compiler compiler, @NotNull @NotNull Compiler fallBack)
fallback
compiler.compiler
- the compiler.fallBack
- the compiler to be used to compile unreserved ranges.java.lang.NullPointerException
- if the given compiler
or fallback
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.