boolean () { boolean parsed = (parseLiteralPattern() || parseGroupOrParenthesizedSequencePattern() || parseSequencePatternInBrackets() || parseMappingPattern() || parseClassPattern() || parseValuePattern() || parseWildcardPattern() || parseCapturePattern() || // The following two are allowed only inside mapping and sequence patterns respectively, // but from recovery standpoint, it's easier to match them universally and then report // wrong contexts in a dedicated annotator. parseDoubleStarPattern() || parseSingleStarPattern()); if (parsed) { consumeIllegalLeftoverExpressionTokens(); } return parsed; }