Neos\Eel\Validation\ExpressionSyntaxValidator::isValid PHP Method

isValid() protected method

Check if $value is valid. If it is not valid, needs to add an error to Result.
protected isValid ( mixed $value ) : void
$value mixed
return void
    protected function isValid($value)
    {
        $parser = new EelParser($value);
        $result = $parser->match_Expression();
        if ($result === false) {
            $this->addError('Expression "%s" could not be parsed.', 1421940748, [$value]);
        } elseif ($parser->pos !== strlen($value)) {
            $this->addError('Expression "%s" could not be parsed. Error starting at character %d: "%s".', 1421940760, [$value, $parser->pos, substr($value, $parser->pos)]);
        }
    }
ExpressionSyntaxValidator