Hostnet\Component\Webpack\Asset\TwigParser::expect PHP Method

expect() private method

private expect ( $filename, Twig_Token $token, $type, $value = null )
$token Twig_Token
    private function expect($filename, \Twig_Token $token, $type, $value = null)
    {
        if ($token->getType() !== $type) {
            throw new \RuntimeException(sprintf('Parse error in %s at line %d. Expected %s%s, got %s.', $filename, $token->getLine(), \Twig_Token::typeToEnglish($type), $value !== null ? ' "' . $value . '"' : '', \Twig_Token::typeToEnglish($token->getType())));
        }
    }