original_string: public function register($name, callable $compiler, callable $evaluator)
      {
          if (null !== $this->parser) {
              throw new \LogicException('Registering functions after calling evaluate(), compile() or parse() is not supported.');
          }
  
          $this->functions[$name] = ['compiler' => $compiler, 'evaluator' => $evaluator];
      }
code: public function register($name, callable $compiler, callable $evaluator)
      {
          if (null !== $this->parser) {
              throw new \LogicException('Registering functions after calling evaluate(), compile() or parse() is not supported.');
          }
  
          $this->functions[$name] = ['compiler' => $compiler, 'evaluator' => $evaluator];
      }
code_tokens: public function register ( $ name , callable $ compiler , callable $ evaluator ) { if ( null !== $ this -> parser ) { throw new \ LogicException ( 'Registering functions after calling evaluate(), compile() or parse() is not supported.' ) ; } $ this -> functions [ $ name ] = [ 'compiler' => $ compiler , 'evaluator' => $ evaluator ] ; }
docstring: Registers a function.
  
  @param string   $name      The function name
  @param callable $compiler  A callable able to compile the function
  @param callable $evaluator A callable able to evaluate the function
  
  @throws \LogicException when registering a function after calling evaluate(), compile() or parse()
  
  @see ExpressionFunction
docstring_tokens: Registers a function .