/*
Lambda parameters
508356
final public void LambdaParameters() throws ParseException {
                                             /*@bgen(jjtree) LambdaParameters */
  AstLambdaParameters jjtn000 = new AstLambdaParameters(JJTLAMBDAPARAMETERS);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
    try {
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case IDENTIFIER:
        Identifier();
        break;
      case LPAREN:
        jj_consume_token(LPAREN);
        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
        case IDENTIFIER:
          Identifier();
          label_4:
          while (true) {
            switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
            case COMMA:
              ;
              break;
            default:
              jj_la1[5] = jj_gen;
              break label_4;
            }
            jj_consume_token(COMMA);
            Identifier();
          }
          break;
        default:
          jj_la1[6] = jj_gen;
          ;
        }
        jj_consume_token(RPAREN);
        break;
      default:
        jj_la1[7] = jj_gen;
        jj_consume_token(-1);
        throw new ParseException();
      }
    } catch (Throwable jjte000) {
      if (jjtc000) {
        jjtree.clearNodeScope(jjtn000);
        jjtc000 = false;
      } else {
        jjtree.popNode();
      }
      if (jjte000 instanceof RuntimeException) {
        {if (true) throw (RuntimeException)jjte000;}
      }
      if (jjte000 instanceof ParseException) {
        {if (true) throw (ParseException)jjte000;}
      }
      {if (true) throw (Error)jjte000;}
    } finally {
      if (jjtc000) {
        jjtree.closeNodeScope(jjtn000, true);
      }
    }
  }
484452
def call(self, params, _context, **kwargs):
        ''''''

        assert len(params) == self.paramCount
        # using setattr because '=' is not allowed inside of lambdas
        return evaluate_impl(self.body, params).then(lambda value: setattr(_context.results, 'value', value))
328320
def _update_param(self):
        

        """

        # Update the gamma parameter.
        if not isinstance(self._beta_update, type(None)):
            self._beta = self._beta_update(self._beta)

        # Update lambda parameter.
        if not isinstance(self._lambda_update, type(None)):
            self._lambda = self._lambda_update(self._lambda)
563889
final public void MethodParameters() throws ParseException {
                                             /*@bgen(jjtree) MethodParameters */
  AstMethodParameters jjtn000 = new AstMethodParameters(JJTMETHODPARAMETERS);
  boolean jjtc000 = true;
  jjtree.openNodeScope(jjtn000);
    try {
      jj_consume_token(LPAREN);
      switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
      case START_SET_OR_MAP:
      case INTEGER_LITERAL:
      case FLOATING_POINT_LITERAL:
      case STRING_LITERAL:
      case TRUE:
      case FALSE:
      case NULL:
      case LPAREN:
      case LBRACK:
      case NOT0:
      case NOT1:
      case EMPTY:
      case MINUS:
      case IDENTIFIER:
        Expression();
        label_15:
        while (true) {
          switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
          case COMMA:
            ;
            break;
          default:
            jj_la1[37] = jj_gen;
            break label_15;
          }
          jj_consume_token(COMMA);
          Expression();
        }
        break;
      default:
        jj_la1[38] = jj_gen;
        ;
      }
      jj_consume_token(RPAREN);
    } catch (Throwable jjte000) {
      if (jjtc000) {
        jjtree.clearNodeScope(jjtn000);
        jjtc000 = false;
      } else {
        jjtree.popNode();
      }
      if (jjte000 instanceof RuntimeException) {
        {if (true) throw (RuntimeException)jjte000;}
      }
      if (jjte000 instanceof ParseException) {
        {if (true) throw (ParseException)jjte000;}
      }
      {if (true) throw (Error)jjte000;}
    } finally {
      if (jjtc000) {
        jjtree.closeNodeScope(jjtn000, true);
      }
    }
  }
191364
void parameter(Object value) {
        // TODO check on supported types?
        if (value instanceof Observable)
            throw new IllegalArgumentException(
                    "use parameters() method not the parameter() method for an Observable");
        parameters(Observable.just(value));
    }
858421
function process( $tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $rootNamespace, $currentNamespace )
    {
        $params = $functionParameters;
        switch ( $functionName )
        {
            case $this->BlockName:
            {
                $name ="";
                $menuIni = eZINI::instance( "menu.ini" );

                if ( isset( $functionParameters["name"] ) )
                {
                    $menuName = $tpl->elementValue( $functionParameters["name"], $rootNamespace, $currentNamespace, $functionPlacement );
                    if ( $menuIni->hasVariable( 'SelectedMenu', $menuName ) )
                    {
                        $menuTemplate = $menuIni->variable( 'SelectedMenu', $menuName );
                        if ( $menuTemplate != null )
                        {
                            $uri = "design:menu/$menuTemplate.tpl";
                            $tpl->processURI( $uri, true, $extraParameters, $textElements, $name, $name );
                        }
                    }
                }
            }
        }
    }
824103
function paramParser(rawParams) {
    if (rawParams === void 0) { rawParams = ''; }
    var /** @type {?} */ map = new Map();
    if (rawParams.length > 0) {
        var /** @type {?} */ params = rawParams.split('&');
        params.forEach(function (param) {
            var /** @type {?} */ eqIdx = param.indexOf('=');
            var _a = eqIdx == -1 ? [param, ''] : [param.slice(0, eqIdx), param.slice(eqIdx + 1)], key = _a[0], val = _a[1];
            var /** @type {?} */ list = map.get(key) || [];
            list.push(val);
            map.set(key, list);
        });
    }
    return map;
}
995568
function Parameter(options)
{
  // validate input
  Errors.assertInternal(Util.isObject(options));
  Errors.assertInternal(Util.isString(options.name));
  Errors.assertInternal(Util.exists(options.value));

  var name = options.name;
  var value = options.value;

  /**
   * Returns the name of the parameter.
   *
   * @returns {String}
   */
  this.getName = function ()
  {
    return name;
  };

  /**
   * Returns the value of the parameter.
   *
   * @returns {*}
   */
  this.getValue = function ()
  {
    return value;
  };

  /**
   * Updates the value of the parameter.
   *
   * @param {*} targetValue
   */
  this.setValue = function (targetValue)
  {
    value = targetValue;
  };
}
288644
function process( $tpl, &$textElements, $functionName, $functionChildren, $functionParameters, $functionPlacement, $rootNamespace, $currentNamespace )
    {
        $children = $functionChildren;
        $parameters = $functionParameters;
        $name = null;
        if ( isset( $parameters["name"] ) )
             $name = $tpl->elementValue( $parameters["name"], $rootNamespace, $currentNamespace, $functionPlacement );
        if ( $name === null )
        {
            $name = $currentNamespace;
        }
        else
        {
            if ( $currentNamespace != "" )
                $name = "$currentNamespace:$name";
        }

        $loopItem = null;
        $hasLoopItemParameter = false;
        if ( isset( $parameters["loop"] ) )
        {
            $hasLoopItemParameter = true;
            $loopItem = $tpl->elementValue( $parameters["loop"], $rootNamespace, $currentNamespace, $functionPlacement );
        }

        $variableIterator = null;
        if ( isset( $parameters['var'] ) )
        {
            $variableIterator = $tpl->elementValue( $parameters['var'], $rootNamespace, $currentNamespace, $functionPlacement );
        }

        $noLastValue = true;
        if ( isset( $parameters['last-value'] ) )
        {
            $lastValue = $tpl->elementValue( $parameters['last-value'], $rootNamespace, $currentNamespace, $functionPlacement );
            $noLastValue = !$lastValue;
        }

        $reverseLoop = false;
        if ( isset( $parameters['reverse'] ) )
        {
            $reverseLoop = $tpl->elementValue( $parameters['reverse'], $rootNamespace, $currentNamespace, $functionPlacement );
        }
        if ( $hasLoopItemParameter and $loopItem === null )
            return;

        $showItem = null;
        $showSet = isset( $parameters["show"] );
        if ( $showSet )
            $showItem = $tpl->elementValue( $parameters["show"], $rootNamespace, $currentNamespace, $functionPlacement );

        $sequenceStructure = null;
        if ( isset( $parameters["sequence"] ) )
            $sequenceStructure = $tpl->elementValue( $parameters["sequence"], $rootNamespace, $currentNamespace, $functionPlacement );

        $iterationMaxCount = false;
        if ( isset( $parameters["max"] ) )
        {
            $iterationMaxCount = $tpl->elementValue( $parameters["max"], $rootNamespace, $currentNamespace, $functionPlacement );
            if ( is_array( $iterationMaxCount ) )
            {
                $iterationMaxCount = count( $iterationMaxCount );
            }
            else if ( !is_numeric( $iterationMaxCount ) )
            {
                $tpl->warning( $functionName, "Wrong parameter type '" . gettype( $iterationMaxCount ) . "' for 'max', use either numericals or arrays", $functionPlacement );
            }
            $iterationMaxCount = (int)$iterationMaxCount;
        }

        $iterationOffset = false;
        if ( isset( $parameters["offset"] ) )
        {
            $iterationOffset = $tpl->elementValue( $parameters["offset"], $rootNamespace, $currentNamespace, $functionPlacement );
            if ( is_array( $iterationOffset ) )
            {
                $iterationOffset = count( $iterationOffset );
            }
            else if ( !is_numeric( $iterationOffset ) )
            {
                $tpl->warning( $functionName, "Wrong parameter type '" . gettype( $iterationOffset ) . "' for 'offset', use either numericals or arrays", $functionPlacement );
            }
            $iterationOffset = (int)$iterationOffset;
            if ( $iterationOffset < 0 )
            {
                $tpl->warning( $functionName, "The 'offset' parameter can only be negative, $iterationOffset is not accepteed, the value will be reset to 0", $functionPlacement );
                $iterationOffset = 0;
            }
        }

        $elseName = $functionName . "-else";
        $delimiterStructure = null;
        $filterStructure = array();
        $else = null;
        $shown = 1;
        $items = array();
        $items[0] = array();
        $items[1] = array();
        if ( is_array( $children ) )
        {
            foreach ( array_keys( $children ) as $childKey )
            {
                $child =& $children[$childKey];
                $childType = $child[0];
                if ( $childType == eZTemplate::NODE_FUNCTION )
                {
                    switch ( $child[2] )
                    {
                        case "delimiter":
                        {
                            if ( $shown === 1 and $delimiterStructure === null )
                            {
                                $delimiterStructure =& $child;
                            }
                        } break;
                        case "section-exclude":
                        case "section-include":
                        {
                            if ( $shown === 1 )
                                $filterStructure[] =& $child;
                        } break;
                        case $elseName:
                        {
                            $else =& $child;
                            $shown = 0;
                        } break;
                        default:
                        {
                            $items[$shown][] =& $child;
                        } break;
                    }
                }
                else
                {
                    $items[$shown][] =& $child;
                }
            }
        }

        $canShowBlock = true;
        if( $showSet and ( ( is_array( $showItem ) and count( $showItem ) == 0 ) or
                           ( is_numeric( $showItem ) and $showItem == 0 ) or
                           ( is_string( $showItem ) > 0 and strlen( $showItem ) == 0 ) or
                           !$showItem ) )
            $canShowBlock = false;

        if ( ( !$showSet or ( $showSet and $canShowBlock ) ) and $loopItem === null )
        {
            $this->processChildrenOnce( $textElements, $items[1], $tpl, $rootNamespace, $name );
        }
        else
        {
            $iteratorData = array( 'iterator' => false );
            $showMainBody = true;
            if ( $showSet )
            {
                if( !$canShowBlock )
                    $showMainBody = false;
            }
            if ( $showMainBody )
            {
                $isFirstRun = true;
                $index = 0;
                if ( is_array( $loopItem ) )
                {
                    $array =& $loopItem;
                    $arrayKeys = array_keys( $array );
                    if ( $reverseLoop )
                        $arrayKeys = array_reverse( $arrayKeys );
                    if ( $iterationOffset !== false )
                        $arrayKeys = array_splice( $arrayKeys, $iterationOffset );
                    $currentCount = 0;
                    foreach ( $arrayKeys as $key )
                    {
                        unset( $item );
                        $item =& $array[$key];
                        $usedElement = $this->processChildren( $textElements, $items[1], $key, $item, $index, $isFirstRun,
                                                               $delimiterStructure, $sequenceStructure, $filterStructure,
                                                               $tpl, $rootNamespace, $name, $functionPlacement,
                                                               $variableIterator, $noLastValue,
                                                               $iteratorData );
                        if ( $usedElement )
                        {
                            if ( $iterationMaxCount !== false )
                            {
                                ++$currentCount;
                                if ( $currentCount >= $iterationMaxCount )
                                    break;
                            }
                        }
                    }
                }
                else if ( is_numeric( $loopItem ) )
                {
                    $value = $loopItem;
                    $count = $value;
                    if ( $value < 0 )
                        $count = -$count;
                    $loopStart = 0;
                    if ( $iterationOffset !== false )
                        $loopStart = $iterationOffset;
                    $currentCount = 0;
                    for ( $i = $loopStart; $i < $count; ++$i )
                    {
                        unset( $iterator );
                        if ( $reverseLoop )
                            $iterator = ( $count - $i ) - 1;
                        else
                            $iterator = $i;
                        unset( $key );
                        unset( $item );
                        if ( $value < 0 )
                        {
                            $key = $iterator;
                            $item = -$iterator - 1;
                        }
                        else
                        {
                            $key = $iterator;
                            $item = $iterator + 1;
                        }
                        $usedElement = $this->processChildren( $textElements, $items[1], $key, $item, $index, $isFirstRun,
                                                               $delimiterStructure, $sequenceStructure, $filterStructure,
                                                               $tpl, $rootNamespace, $name, $functionPlacement,
                                                               $variableIterator, $noLastValue,
                                                               $iteratorData );
                        if ( $usedElement )
                        {
                            if ( $iterationMaxCount !== false )
                            {
                                ++$currentCount;
                                if ( $currentCount >= $iterationMaxCount )
                                    break;
                            }
                        }
                    }
                }
                else if ( is_string( $loopItem ) )
                {
                    $text =& $loopItem;
                    $stringLength = strlen( $text );
                    $loopStart = 0;
                    if ( $iterationOffset !== false )
                        $loopStart = $iterationOffset;
                    $currentCount = 0;
                    for ( $i = $loopStart; $i < $stringLength; ++$i )
                    {
                        if ( $reverseLoop )
                            $iterator = ($stringLength - $i) - 1;
                        else
                            $iterator = $i;
                        unset( $key );
                        unset( $item );
                        $key = $iterator;
                        $item = $text[$iterator];
                        $usedElement = $this->processChildren( $textElements, $items[1], $key, $item, $index, $isFirstRun,
                                                               $delimiterStructure, $sequenceStructure, $filterStructure,
                                                               $tpl, $rootNamespace, $name, $functionPlacement,
                                                               $variableIterator, $noLastValue,
                                                               $iteratorData );
                        if ( $usedElement )
                        {
                            if ( $iterationMaxCount !== false )
                            {
                                ++$currentCount;
                                if ( $currentCount >= $iterationMaxCount )
                                    break;
                            }
                        }
                    }
                }
                if ( !$isFirstRun )
                {
                    if ( $variableIterator !== null )
                    {
                        $tpl->unsetVariable( $variableIterator, $name );
                    }
                    else
                    {
                        $tpl->unsetVariable( "key", $name );
                        $tpl->unsetVariable( "item", $name );
                        $tpl->unsetVariable( "index", $name );
                        $tpl->unsetVariable( "number", $name );
                        if ( $sequenceStructure !== null and is_array( $sequenceStructure ) )
                            $tpl->unsetVariable( "sequence", $name );
                    }
                }
            }
            else
            {
                $this->processChildrenOnce( $textElements, $items[0], $tpl, $rootNamespace, $name );
            }
        }
    }
498340
function parameterize(candidate) {
		candidate.param = candidate.param.map(function(param) {
			var value;

			if ('value' in param) {
				value = param.value;
			}
			else if ('reference' in param) {
				value = candidate.param.reduce(function(p, c) {
					return c !== param && !p && param.reference === c.name && 'value' in c ? c.value : p;
				}, null);
			}

			return value;
		});

		return candidate;
	}
120893
private void eliminateParamsAfter(Node fnNode, int argIndex) {
    Node formalArgPtr = NodeUtil.getFunctionParameters(fnNode).getFirstChild();
    while (argIndex != 0 && formalArgPtr != null) {
      formalArgPtr = formalArgPtr.getNext();
      argIndex--;
    }
    eliminateParamsAfter(fnNode, formalArgPtr);
  }
133744
@Override
	public void declareParameters(String paramString) {
		checkUnmodifiable();
		parameters.clear();
		paramString = paramString.trim();
		int i1 = paramString.indexOf(',');
		while (i1 >= 0) {
			String p1 = paramString.substring(0, i1).trim();
			updateParameterDeclaration(p1);
			paramString = paramString.substring(i1+1, paramString.length()).trim();
			i1 = paramString.indexOf(',');
		}
		updateParameterDeclaration(paramString);
		resetQuery();
	}
1351760
function process( $tpl, &$value, $nspace, $current_nspace )
    {
        $named_params = array();
        $param_list = $tpl->operatorParameterList( $this->Name );
        $i = 0;
        foreach ( $param_list as $param_name => $param_type )
        {
            if ( !isset( $this->Params[$i] ) or
                 $this->Params[$i]["type"] == "null" )
            {
                if ( $param_type["required"] )
                {
                    $tpl->warning( "eZTemplateOperatorElement", "Parameter '$param_name' ($i) missing" );
                    $named_params[$param_name] = $param_type["default"];
                }
                else
                {
                    $named_params[$param_name] = $param_type["default"];
                }
            }
            else
            {
                $param_data = $this->Params[$i];
                $named_params[$param_name] = $tpl->elementValue( $param_data, $nspace );
            }
            ++$i;
        }
        if ( $param_list !== null )
            $tpl->doOperator( $this, $nspace, $current_nspace, $value, $this->Name, $this->Params, $named_params );
        else
            $tpl->doOperator( $this, $nspace, $current_nspace, $value, $this->Name, $this->Params );
    }
1023986
def visit_lambda(self, node):
        """"""
        args = node.args.accept(self)
        body = node.body.accept(self)
        if args:
            return "lambda %s: %s" % (args, body)

        return "lambda: %s" % body
172735
function method (lambda) {
  return function () {
    return lambda.apply(null, [this].concat(Array.prototype.slice.call(arguments, 0)));
  };
}
725537
function executeCommand(parameters) {
    if (!parameters.role && parameters.roleManually) { parameters.role = parameters.roleManually; }

    const configFilePath = path.join(process.cwd(), plugin.config.lambdasPath, parameters.identifier);
    return fs.mkdirp(configFilePath)
    .then(() => {
      // We create the configuration file of the Lambda
      const config = {
        params: {
          Timeout: parameters.timeout,
          MemorySize: parameters.memory,
          Role: parameters.role,
          Runtime: parameters.runtime,
          Handler: _.startsWith(parameters.runtime, 'nodejs') ? 'index.handler' : 'lambda_function.lambda_handler'
        }
      };
      // We save the configuration in a json file
      return fs.writeFile(configFilePath + path.sep + 'config.json', JSON.stringify(config, null, 2));
    })
    .then(() => {
      return _.startsWith(parameters.runtime, 'nodejs')
        ? initNodeJs(parameters, configFilePath)
        : initPython(parameters, configFilePath);
    })
    .then(() => {
      // We create a test event file
      const src = path.join(__dirname, 'templates', 'events');
      const dest = path.join(configFilePath, 'events');
      return fs.copy(src, dest);
    })
    .then(() => {
      const msg = '\n  The Lambda ' + icli.format.info(parameters.identifier) + ' has been created\n\n'
                + '  Its configuration and its handler function are available in ' + icli.format.info(configFilePath) + '\n';
      icli.print(msg);
    });
  }
452243
function Parameter(match) {
  let param;
  const matchValue = match.substr(2, match.length - 4).trim();
  const i = matchValue.indexOf(':');

  if (i !== -1) {
    param = {
      key: matchValue.substr(0, i),
      defaultValue: matchValue.substr(i + 1)
    };
  } else {
    param = { key: matchValue };
  }

  return param;
}