FreeBSD/contrib/mdocml/mdoc_macro.c
/*
 * This is called at the end of parsing.  It must traverse up the tree,
 * closing out open [implicit] scopes.  Obviously, open explicit scopes
 * are errors.
 */
This is called at the end of parsing.  It must traverse up the tree,
closing out open [implicit] scopes.  Obviously, open explicit scopes
are errors.
This is called at the end of parsing . It must traverse up the tree closing out open [ implicit ] scopes . Obviously open explicit scopes are errors .
void
mdoc_endparse(struct roff_man *mdoc)
{
	struct roff_node *n;
	n = mdoc->last->flags & MDOC_VALID ?
	    mdoc->last->parent : mdoc->last;
	for ( ; n; n = n->parent)
		if (n->type == ROFFT_BLOCK &&
		    mdoc_macros[n->tok].flags & MDOC_EXPLICIT)
			mandoc_msg(MANDOCERR_BLK_NOEND, mdoc->parse,
			    n->line, n->pos, mdoc_macronames[n->tok]);
	rew_last(mdoc, mdoc->first);
	mdoc_state_reset(mdoc);
}
void mdoc_endparse ( struct roff_man * mdoc ) { struct roff_node * n ; n = mdoc -> last -> flags & MDOC_VALID ? mdoc -> last -> parent : mdoc -> last ; for ( ; n ; n = n -> parent ) if ( n -> type == ROFFT_BLOCK && mdoc_macros [ n -> tok ] . flags & MDOC_EXPLICIT ) mandoc_msg ( MANDOCERR_BLK_NOEND , mdoc -> parse , n -> line , n -> pos , mdoc_macronames [ n -> tok ] ) ; rew_last ( mdoc , mdoc -> first ) ; mdoc_state_reset ( mdoc ) ; }
This is called at the end of parsing.
This is called at the end of parsing .
/* Scan for open explicit scopes. */ /* Rewind to the first. */