public Statement toStatement ( ) { return new Statement ( ) { @ Override protected void doGen ( CodeBuilder adapter ) { Expression . this . gen ( adapter ) ; switch ( resultType ( ) . getSize ( ) ) { case 0 : throw new AssertionError ( "void expressions are not allowed" ) ; case 1 : adapter . pop ( ) ; break ; case 2 : adapter . pop2 ( ) ; break ; default : throw new AssertionError ( ) ; } } } ; }
Convert this expression to a statement by executing it and throwing away the result .