Parse-postfix-expression-rest
Parse the rest of a postfix-expression.
- Signature
(parse-postfix-expression-rest token input current)
→
(mv tree next-token rest-input)
- Arguments
- token — Guard (abnf::tree-optionp token).
- input — Guard (abnf::tree-listp input).
- current — Guard (abnf::treep current).
- Returns
- tree — Type (abnf::tree-resultp tree).
- next-token — Type (abnf::tree-optionp next-token).
- rest-input — Type (abnf::tree-listp rest-input).
The argument current is the postfix expression
that starts this postfix expression.
If this function is called from parse-postfix-expression,
current is a prefix expression wrapped with a postfix expression;
if this function was called from itself,
current is an operator-call or a tuple-component-expression
or a struct-component-expression,
wrapped with a postfix expression.
We then attempt to parse the rest of an
operator-call or tuple-component-expression
or struct-component-expression here.
If successful, we wrap it and call this function recursively.
Otherwise we just return current.