- /* LINTED */
- for (n = mdoc->last; n; n = n->parent) {
- c = rewind_dohalt(tok, MDOC_BODY, n);
- if (REWIND_HALT == c)
- return(1);
- if (REWIND_REWIND == c)
- break;
- else if (rewind_dobreak(tok, MDOC_BODY, n))
- continue;
- return(mdoc_verr(mdoc, n, ERR_SCOPE_BREAK));
- }
-
- assert(n);
- return(rewind_last(mdoc, n));
-}
-
-
-static int
-rewind_head(struct mdoc *mdoc, int tok)
-{
- struct mdoc_node *n;
- int c;
+ c = rewind_dohalt(tok, type, mdoc->last);
+ if (REWIND_HALT == c)
+ return(1);
+ if (REWIND_REWIND == c)
+ return(rewind_last(tok, type, mdoc, mdoc->last));