@@ -213,13 +213,15 @@ static constexpr auto propertyListParser(PropParser... pp) {
213213 // the entire list in each of the alternative property parsers. Otherwise,
214214 // the name parser could stop after "foo" in "(foo, bar(1))", without
215215 // allowing the next parser to give the list a try.
216+ auto listOf{[](auto parser) { //
217+ return nonemptySeparated(parser, ","_tok);
218+ }};
216219
217220 using P = OmpTraitProperty;
218- return maybe("(" >>
221+ return maybe("(" >> //
219222 construct<OmpTraitSelector::Properties>(
220223 maybe(Parser<OmpTraitScore>{} / ":"_tok),
221- (attempt(nonemptySeparated(construct<P>(pp), ","_tok) / ")"_tok) ||
222- ...)));
224+ (attempt(listOf(sourced(construct<P>(pp))) / ")"_tok) || ...)));
223225}
224226
225227// Parser for OmpTraitSelector
@@ -286,8 +288,8 @@ struct TraitSelectorParser {
286288 const Parser<OmpTraitSelectorName> np;
287289};
288290
289- TYPE_PARSER(construct<OmpTraitSelector>(
290- TraitSelectorParser(Parser<OmpTraitSelectorName>{})))
291+ TYPE_PARSER(sourced( construct<OmpTraitSelector>(
292+ sourced( TraitSelectorParser(Parser<OmpTraitSelectorName>{})) )))
291293
292294TYPE_PARSER(construct<OmpTraitSetSelectorName::Value>(
293295 "CONSTRUCT" >> pure(OmpTraitSetSelectorName::Value::Construct) ||
0 commit comments