Lines Matching defs:formal

453 /* Allocate a new formal.  */
458 formal_entry *formal;
460 formal = xmalloc (sizeof (formal_entry));
462 sb_new (&formal->name);
463 sb_new (&formal->def);
464 sb_new (&formal->actual);
465 formal->next = NULL;
466 formal->type = FORMAL_OPTIONAL;
467 return formal;
470 /* Free a formal. */
473 del_formal (formal_entry *formal)
475 sb_kill (&formal->actual);
476 sb_kill (&formal->def);
477 sb_kill (&formal->name);
478 free (formal);
481 /* Pick up the formal parameters of a macro definition. */
492 formal_entry *formal = new_formal ();
495 idx = get_token (idx, in, &formal->name);
496 if (formal->name.len == 0)
503 /* This is a formal. */
504 name = sb_terminate (&formal->name);
525 formal->type = FORMAL_REQUIRED;
527 formal->type = FORMAL_VARARG;
541 idx = get_any_string (idx + 1, in, &formal->def);
543 if (formal->type == FORMAL_REQUIRED)
545 sb_reset (&formal->def);
556 hash_jam (macro->formal_hash, name, formal);
564 formal->index = macro->formal_count++;
565 *p = formal;
566 p = &formal->next;
567 if (formal->type == FORMAL_VARARG)
580 formal_entry *formal = new_formal ();
582 /* Add a special NARG formal, which macro_expand will set to the
591 sb_add_string (&formal->name, name);
600 hash_jam (macro->formal_hash, name, formal);
602 formal->index = NARG_INDEX;
603 *p = formal;
706 /* Substitute the actual value for a formal parameter. */
983 /* Assign values to the formal parameters of a macro, and expand the
1049 /* This is a keyword arg, fetch the formal name and
1055 err = _("confusion in formal parameters");
1059 /* Lookup the formal in the macro's list. */
1162 /* Discard any unnamed formal arguments. */
1243 formal_entry *formal;
1245 for (formal = macro->formals; formal; )
1249 f = formal;
1250 formal = formal->next;