private function parseToken(array $parsedTokens, TokenParserInterface $parser, Token $token): array
    {
        $parsedToken = $parser->parse($token);

        if ($parsedToken instanceof FunctionCallValue) {
            // Check if the pattern was something like @value_<func()> in which case the function call should be part of the reference
            // name
            $lastParsedToken = end($parsedTokens);

            if ($lastParsedToken instanceof FixtureReferenceValue) {
                $parsedTokens[key($parsedTokens)] = new FixtureReferenceValue(
                    new ListValue([
                        $lastParsedToken->getValue(),
                        $parsedToken,
                    ])
                );

                return $parsedTokens;
            }
        }

        $parsedToken = ($parsedToken instanceof NestedValue)
            ? $parsedToken->getValue()
            : [$parsedToken]
        ;

        foreach ($parsedToken as $value) {
            $parsedTokens[] = $value;
        }

        return $parsedTokens;
    }