It takes a MatchExpression, but it really should take an ExpressionWithPlaceholder, since it will be matching elements without a path.
The syntax of the expression should be updated to take a placeholder as an argument, which will be used as the path when parsing the subexpression into an ExpressionWithPlaceholder.