Examples of ExpressionNodeForSwitchCase


Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForSwitchCase

      final int nArrays = (fun == HLOOKUP) ? desc.numberOfRows() : desc.numberOfColumns();
      final ExpressionNodeForSwitchCase[] caseNodes = new ExpressionNodeForSwitchCase[ nArrays ];
      for (int iArray = 0; iArray < nArrays; iArray++) {
        final ExpressionNode valueArrayNode = getHVLookupSubArray( fun, arrayNode, iArray );
        final ExpressionNode lookupNode = fun( INDEX, valueArrayNode, matchRefNode );
        caseNodes[ iArray ] = new ExpressionNodeForSwitchCase( lookupNode, iArray + 1 );
      }
      final ExpressionNode switchNode = new ExpressionNodeForSwitch( selectorNode, defaultNode, caseNodes );
      final ExpressionNode matchLetNode = letByName( matchRefName, matchNode, switchNode );
      return matchLetNode;
    }
View Full Code Here

Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForSwitchCase

  private ExpressionNode rewriteChoose( ExpressionNodeForFunction _fun )
  {
    final ExpressionNodeForSwitch result = new ExpressionNodeForSwitch( _fun.argument( 0 ),
        err( "#VALUE! because index to CHOOSE is out of range" ) );
    for (int iCase = 1; iCase < _fun.cardinality(); iCase++) {
      result.addArgument( new ExpressionNodeForSwitchCase( _fun.argument( iCase ), iCase ) );
    }
    return result;
  }
View Full Code Here

Examples of org.formulacompiler.compiler.internal.expressions.ExpressionNodeForSwitchCase

        private int switchIndex = 0;

        @Override
        protected void generateCase( int _key, Label _end ) throws CompilerException
        {
          final ExpressionNodeForSwitchCase caze = switchValueCases[ this.switchIndex++ ];
          if (null != caze) {
            compileExpression( caze.value() );
            mv().visitInsn( this.valReturn );
          }
        }

      } );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.