@@ -538,7 +538,7 @@ extension ParserTestCase {
538538 applyFixIts: [ String ] ? = nil ,
539539 fixedSource expectedFixedSource: String ? = nil ,
540540 options: AssertParseOptions = [ ] ,
541- experimentalFeatures: Parser . ExperimentalFeatures = [ ] ,
541+ experimentalFeatures: Parser . ExperimentalFeatures ? = nil ,
542542 file: StaticString = #file,
543543 line: UInt = #line
544544 ) {
@@ -610,6 +610,8 @@ extension ParserTestCase {
610610 /// - applyFixIts: Applies only the fix-its with these messages.
611611 /// - fixedSource: Asserts that the source after applying fix-its matches
612612 /// this string.
613+ /// - experimentalFeatures: A list of experimental features to enable, or
614+ /// `nil` to enable the default set of features provided by the test case.
613615 func assertParse< S: SyntaxProtocol > (
614616 _ markedSource: String ,
615617 _ parse: ( inout Parser ) -> S ,
@@ -619,10 +621,12 @@ extension ParserTestCase {
619621 applyFixIts: [ String ] ? = nil ,
620622 fixedSource expectedFixedSource: String ? = nil ,
621623 options: AssertParseOptions = [ ] ,
622- experimentalFeatures: Parser . ExperimentalFeatures = [ ] ,
624+ experimentalFeatures: Parser . ExperimentalFeatures ? = nil ,
623625 file: StaticString = #file,
624626 line: UInt = #line
625627 ) {
628+ let experimentalFeatures = experimentalFeatures ?? self . experimentalFeatures
629+
626630 // Verify the parser can round-trip the source
627631 var ( markerLocations, source) = extractMarkers ( markedSource)
628632 markerLocations [ " START " ] = 0
0 commit comments