Class SquareArrayConstructorCompiler

  • public class SquareArrayConstructorCompiler
    extends ToItemCompiler
    Generate bytecode for an SquareArrayConstructor expression. This typically originates as an array constructor in square brackets, for example [a,b,c,d].
    • Constructor Detail

      • SquareArrayConstructorCompiler

        public SquareArrayConstructorCompiler()
    • Method Detail

      • compileToItem

        public void compileToItem​(CompilerService compiler,
                                  Expression expression)
                           throws CannotCompileException
        Generate bytecode to evaluate the ArrayBlockExpression as an (array) item Precondition: none. Postcondition: the stack contains an item representing the constructed array
        Specified by:
        compileToItem in class ExpressionCompiler
        compiler - the compiler service
        expression - the expression to be compiled
        CannotCompileException - if the expression cannot be compiled to bytecode