Skip to content

Commit afd6bce

Browse files
committed
Add comment to PredicatedParser
1 parent 64bca90 commit afd6bce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

flang/lib/Parser/openmp-parsers.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ constexpr auto operator>=(PA checker, PB parser) {
6464
return lookAhead(checker) >> parser;
6565
}
6666

67+
// This parser succeeds if the given parser succeeds, and the result
68+
// satisfies the given condition. Specifically, it succeeds if:
69+
// 1. The parser given as the argument succeeds, and
70+
// 2. The condition function (called with PA::resultType) returns true
71+
// for the result.
6772
template <typename PA, typename CF> struct PredicatedParser {
6873
using resultType = typename PA::resultType;
6974

0 commit comments

Comments
 (0)