- rightAssoc2<TToken, TOptions, TLeft, TRight>(pLeft: Parser<TToken, TOptions, TLeft>, pOper: Parser<TToken, TOptions, ((x: TLeft, y: TRight) => TRight)>, pRight: Parser<TToken, TOptions, TRight>): Parser<TToken, TOptions, TRight>
-
Type Parameters
-
TToken
-
TOptions
-
TLeft
-
TRight
Parameters
-
pLeft: Parser<TToken, TOptions, TLeft>
-
pOper: Parser<TToken, TOptions, ((x: TLeft, y: TRight) => TRight)>
-
pRight: Parser<TToken, TOptions, TRight>
Returns Parser<TToken, TOptions, TRight>
Make a parser that parses any number of values and operators, then one extra value to combine in right-to-left (last-to-first) order.
Use rightAssoc1 if the grammar doesn't have an explicit operator between values.
Implementation is based on ab and reduceRight.