/**
* @param $expression
* @return array
* @throws \Exception
*/
public function parseTokens($expression)
{
$cacheKey = md5($expression);
if (isset(static::$tokenCache[$cacheKey])) {
return static::$tokenCache[$cacheKey];
}
$lexer = new JSONPathLexer($expression);
$tokens = $lexer->parseExpression();
static::$tokenCache[$cacheKey] = $tokens;
return $tokens;
}